I started experimenting with Neopixels and the adafruit-neopixel library
I wrote two functions that create a runlight-effect.
Next step is to have a runlight with a trailing fade-out-effect
example if LED 10 is at 100% brightness, LED 9 is on 50%, LED 8 on 25% LED 7 on 12% brightness
Some kind of afterglowing like on an oldschool fluorescent analog non-storage oscilloscope
Is there a special function for this or do I have to write this from scratch?
I have done trails by turning on pixels explicitly and using a function called every frame that reads and reduces the intensity of every pixel, down until they are zero.
So no explicit turning off of any LED. LEDs will come on instant, and take whatever number of frames you code to get down to zero.
It works very well. I am surely not struggling with how the human vision system works, or tinkering with different fading algorithms, just a simple linear ramp.
Obvsly you want to play with your exact motions and see the effect of different fade times, which you can see will manifest as different length trails.
A stationary LED woukd just need to be turned on every frame. In the case of a traveler, this happens automatically if the velocity is zero.