I am working with a NeoPixel RGB led and have gone through various tutorials but I have a question regarding the setPixelColor()
.
If I do not have my setPixelColor()
and show()
inside of a for
loop it will not work.
This works:
void holoLight(uint32_t c){
for(uint16_t i = 0; i<2; i++){
holo_pxl.setPixelColor(i, c);
holo_pxl.show();
delay(2500);
}
}
This does not:
void holoLight(uint32_t c){
holo_pxl.setPixelColor(1, c);
holo_pxl.show();
delay(2500);
}
I am sure it is something specific to the language or execution but would love some clarifications, thanks =)
holo_pxl.setPixelColor(0, c);
and report results.holo_pxl
and describes your neopixel device better (is it a matrix? how many LEDs does it have?)holo_pxl.setPixelColor(0, c);
instead ofholo_pxl.setPixelColor(1, c);
in the second example?