G+_Bob Shields Posted June 2, 2018 Share Posted June 2, 2018 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 More sharing options...
G+_Fr. Robert Ballecer, SJ Posted June 2, 2018 Share Posted June 2, 2018 Oh snap... I had fixed that in the code sample, but then I uploaded the unfixed version... So sorry about that. I'll swap the files once I get home on Wednesday. :( Link to comment Share on other sites More sharing options...
Recommended Posts