After spending days in a dead end, I finally got my code to work. Ali gave me a hint and pointed me towards the right direction. I wrongly thought I had to use the Fastled animation library and managed to achieve what I wanted without it. Using simply both increment and decrement operators, I managed to get the light motion I wanted for squats, which was the most complicated of light motions.
The bad news is that although the code works, the lights are not diffused properly. By that I mean, you can see little square dots when the neopixels are on. This is something I am not happy with as it takes away from the fluidity of the experience.
The reason this is happening is due to the square slots of my inner ring model. Although they are great for keeping the neopixels in place, the finished result is not satisfactory enough, as I can clearly see the light concentrated only on the slots.
Okay, so how do I fix this?
I came up with an idea. I re-designed the inner ring model and instead of creating individual square slots, I created one continuous circular slot, as seen on the Rhino model below:
The gap is just 5mm wide, just enough for the neopixels to sit properly. The square hole in the middle is to accommodate the RFID reader.
On the downside, there was another benefit to having individual square slots: they ensured the neopixels were equally distributed around the circle. So I had to find a way to recreate the equal distribution of my neopixels.
I went on Adobe Illustrator and created a copy of my model but this time I added square slots. With the rotation tool, I ensured that the objects were equally distributed around the circle. I simply laser cut this shape on some ply-wood I found in the lab.
This piece of wood will act as a holder for my neopixels. It will allow me to wire them up easily and ensure they are evenly distributed. When the wiring is done, I will simply transfer my neopixels to the actual model.
To be quite honest, I had to re-print the model anyway. As documented in my last post, I realised the model had to be bigger. Therefore, this was not really a setback, just another thing to consider before 3D printing.