Jump to content

After watching KH383, since I have all the components, I thought I 'd breadboard the project and...


G+_Bob Shields
 Share

Recommended Posts

After watching KH383, since I have all the components, I thought I'd breadboard the project and test the Arduino code. Unfortunately, I found a bug in the "sinelon" and "juggle" animations - when trying to step through them, the ANIMATION index often was reset to 0 so I couldn't actually get to the later items in the list.

 

I have found that the use of the beatsin16(xxx, 0, NUM_LEDS) calls in those functions should be beatsin16(xxx, 0, NUM_LEDS - 1) - i.e., the last parameter is the max value "inclusive". So in the original code, we were occasionally accessing off the end of the LED array.

 

I know these animations originated from the DemoReel100 example provided with FastLED, but according to Git, that file was updated in Jan 2017 to make exactly the change I indicated above.

Link to comment
Share on other sites

 Share

×
×
  • Create New...