Jay Converse
Active member
Like many of us, I struggled for many hours with this, I thought my code was wonky.
I had downloaded some nice animation from GitHub, and the project ran great on it's own. But when I added it to my favorite project that includes my PJRC Audio shield code, it wouldn't behave. Even though my FastLed object was initialized to 224 LEDs, it would never display past the 45th one. I spent a tedious hour tracing with Serial.println, looking for 44, 45, 46, and calculations that would make them. At the same time, my Adafruit Neopixel strip and Neopixel matrix objects in my project were all working fine with 224 LEDs.
I started to tediously rework the animation code, then I found a simple work around. It appears that all FastLED code is running fine, it's only .show() that's busted. So, I changed:
FastLED.show();
to
for(int i = 0; i< NUM_LEDS;i++){
strip.setPixelColor(i, strip.Color(FastLeds.r, FastLeds.g, FastLeds.b));
}
strip.show();
and now I have my pretty animations.
I had downloaded some nice animation from GitHub, and the project ran great on it's own. But when I added it to my favorite project that includes my PJRC Audio shield code, it wouldn't behave. Even though my FastLed object was initialized to 224 LEDs, it would never display past the 45th one. I spent a tedious hour tracing with Serial.println, looking for 44, 45, 46, and calculations that would make them. At the same time, my Adafruit Neopixel strip and Neopixel matrix objects in my project were all working fine with 224 LEDs.
I started to tediously rework the animation code, then I found a simple work around. It appears that all FastLED code is running fine, it's only .show() that's busted. So, I changed:
FastLED.show();
to
for(int i = 0; i< NUM_LEDS;i++){
strip.setPixelColor(i, strip.Color(FastLeds.r, FastLeds.g, FastLeds.b));
}
strip.show();
and now I have my pretty animations.