I have a pretty simple project but for some reason feel struggle to get it to work right.
My goal: switching RGB LEDs on and off every 1ms or faster.
Hardware: LumiDrive + LuMini Ring (40 of APA102-2020)
Problem: the ring doesn’t switch fast enough using the pre-defined function color_fill. I wonder if the function or the LuMini can’t switch faster than 0.1s. Any thought on this?
I try not to PWM since I want to use this RGB ring.
Problem: the ring doesn’t switch fast enough using the pre-defined function color_fill. I wonder if the function or the LuMini can’t switch faster than 0.1s. Any thought on this?
It’s probably a little bit of both but the library is probably what’s really limiting your speed. Have you tried switching just one LED at a time rather than the whole 40? The [data sheet doesn’t really say what the max rate is but there’s probably enough information there to calculate a maximum on off rate.
If the LEDs can change as quickly as you need, you may need to end up skipping the library and bit bang the right data out as fast as you can to see if that does the trick. The more LEDs you are changing the more data you have to send and the slower things get so keep that in mind too.](https://cdn.sparkfun.com/assets/0/1/5/c/3/_20181120__APA_102-2020-256-8.pdf)
You could try speeding up the data transfer by writing a routine that directly manipulates the registers in your Arduino. That will significantly speed up how fast you can send out 1’s and zeros’s from your micro controller. You would need to figure out exactly what sequence of 1’s and 0’s to send ahead of time though.
I can’t help with the code needed but these videos and links will explain how port manipulation works.