Iron Man War Machine Mark III LED's
Was wondering if someone would be able to help with a Arduino Sketch for my War machine. I am new at programming and have watched Davids videos but still struggling a bit. I'm currently building a replica of the War Machine Mark III (Attached photo) and want to be able to have my Leds on the unibeam gradually brighten at start up. I am using Tinycircuts for the board and a neopixel ring to start with. I started a sketch to get the color and flickering effect but not sure how to make it gradually brighten at start up? (Sketch below) Any assistance would be greatly appreciated.
#include <Adafruit_NeoPixel.h>
#define PIN 6
Adafruit_NeoPixel strip = Adafruit_NeoPixel(12, PIN, NEO_GRB + NEO_KHZ800);
void setup() {
// put your setup code here, to run once:
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
for ( int led=0; led<12; led++){
strip.setPixelColor(led, 180,20,2);
strip.show();
delay (5);
}
for ( int led=0; led<12; led++){
strip.setPixelColor(led, 200,25,0);
strip.show();
delay (5);
}
}
0
Comments
You can use the NeoPixel "strip.setBrightness();" command to adjust the overall brightness...
Got this to work..
It ramps up in 1 second steps over the first 8 seconds..
My example uses red/blue colors just to make the led activity more noticeable..
Kinda clunky but it works..
Thank you Bob,
Really looking forward to trying this out tonight. At least it gets me started in the right direction, I am a total noob when it comes to programing but I am starting to learn more and more every day thanks to this awesome school and community.
I probably should have put comments in the code so don't hesitate to ask questions...
It's by no means any sort of elegant solution...
I added some comments.