As my project requires a strip of LED lights that I can individually control I decided this would be a great thing to figure out for output week.
I got ahold of these LED lights from Amazon that were not branded but would hopefully do the trick. Each had 6 pads to sauder, three on the
input side and three on the output. Although using a pre-built light strip was a possibility, I wanted to control the number of lights and their spacing -
for the watch mode I really needed 12 lights specifically.
The process began with saudering hte lights togetherwhich was really diffuclt. After a couple of
lights I realized that I could use the attached wire strings to simplify the process.
As my project requires a strip of LED lights that I can individually control I decided this would be a great thing to figure out for output week.
I got ahold of these LED lights from Amazon that were not branded but would hopefully do the trick. Each had 6 pads to sauder, three on the
input side and three on the output. Although using a pre-built light strip was a possibility, I wanted to control the number of lights and their spacing -
for the watch mode I really needed 12 lights specifically.
The process began with saudering hte lights togetherwhich was really diffuclt. After a couple of
lights I realized that I could use the attached wire strings to simplify the process.
void rainbow() {
strip.clear(); // Set all pixel colors to 'off'
// The first NeoPixel in a strand is #0, second is 1, all the way up
// to the count of strip minus one.
for(int i=0; i<12; i++) {
strip.setPixelColor(i, strip.Color(0, 150, 0));
strip.show();
delay(500);
}
}
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if (WheelPos < 85) {
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
} else if (WheelPos < 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
} else {
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
}
void setColor(int pixel, uint32_t color) {
strip.setPixelColor(pixel, color);
strip.show();
}