Closed PaulWieland closed 7 years ago
I'm thinking of throwing in a generic disclaimer in my readme.md about the tested length of my demos. Some routines, like this one use 8 bit math and may not be appropriate for longer strands. I suspect we'd need a 16 bit easing/lerping in order to make this one not skip any LED's. Either that, or I'm going to have to lay off the Scotch and give it some real thought.
The easing demo works fine with the pre-set number of 60 LEDs, but when you raise that number (200 for example) the easing / lerping cause the
lerpVal
to skip numbers and thus not all of the LEDs will light.Example output of
lerpVal
when using 200 LEDs with a 10ms delay:0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 3 3 3 3 3 5 5 5 5 5 7 7 7
Which obviously results in LED 1,4,6 not lighting.This is a very useful demo for beginners, but you run into this issue as soon as you change the number of LEDs to a high enough value or lower the delay. I think it could be worth while to explain how to solve this problem.