I imitate theatre chase sample code in the Tweaking4All website on my LED strip, but the effect of my The light strip becomes a stroboscopic effect instead of Theatre Chase effect.
my code is as follows:
void theaterChase(uint8_t red, uint8_t green, uint8_t blue, int SpeedDelay)
{
for (int j=0; j<10; j++)
{ //do 10 cycles of chasing
for (int q=0; q < 3; q++) {
for (int i=0; i < LED_FRAME_SIZE; i=i+3) {
setPixel(i+q, red, green, blue); //turn every third pixel on
}
showStrip();
osDelay(SpeedDelay);
for (int i=0; i < LED_FRAME_SIZE; i=i+3) {
setPixel(i+q, 0,0,0); //turn every third pixel off
}
}
}
}
The problem is often a weak power supply, or a missing capacitor at the first led, or a signal that is too low (from a ESP8266 for example). Does it work with a normal delay() ?