Hello,
I’m currently working on a project that makes LEDs run on the bottom of my Skateboard at the same speed as the board is running so it appears that the light is standing still.
I’m using magnets and a hall sensor to determine the speed and turn on the next LED after the board rolled the distance that is between every LED (1,6cm)
It is actually working really good, although I’m not happy with the way I did the animation.
Currently I’m turning on the next LED after a certain time and at the same time dim all LEDs to create that fading tail.
The code that pretty much controls the LEDs is here: https://pastebin.com/crm76hgg
In motion and in the dark it looks weird when it starts really bright on one side and is fading on the other end of the board so I’m currently thinking about having this fading “tail” in front and after that moving dot, but I can’t really come up with a clever solution that is not brute force, so I’m asking here for help.
I just need an idea how it could work out, I’m not asking you to program it for me, but I would really appreciate it if you could point me in some kind of direction, because I really want to improve my programming, but right now I’m stuck and have no idea how to realize this.
Thanks for reading and thank you in advance for your help 
https://photos.app.goo.gl/xOcrECi1pPemJKCe2
