These are chat archives for Makuna/NeoPixelBus
@Makuna Oops, don't know how to quote code here yet. You can see the line. Like the equal sign between square brackets - I don't know what that syntax means, and it's not exactly google searchable until I have a textual name for that syntactic delight! I'm hoping you can give me some tips for understanding the code. (I am guessing that it has to do with std::function, which I admit I do not yet understand).
I'm also wondering why you did not use a function pointer, or a virtual member function (which I understand better). Understanding your reasons would help me see not just what it does, but why.
Is that the only reason you need the std c++ library?
@makuna I've got a fairly nuts idea... and I'm not sure if / how it might be implemented... but i've got a habit of over complicating things, so i thought i'd share it with you as you might have a simple solution... the problem..
1) animations at low brightness, especially when slow, are VERY steppy...
lets say for example you want to fade red from 0 to 255 over 10 seconds... that is smooth... the LED gets brighter 25 points / sec, which is 1 point every 40ms, which is quite smooth..
but lets say you want to fade 0 to 5 over 10 seconds, then that is one point every 2 seconds, and it looks really bad...
the solution... would be do have dithering of some description... seeing as the pixels are being updated every 30ms (or more or less) MOST of the time they are not doing anything.. this none time could be used to pulse them up and down 1 point so that the average is a smoother transition between animations. I had a go at making this but it didn't work at all. what do you think, achievable or far to complicated?