Arcade Buttons with WS2812


Well-known member
Hi, Just wondering how to go about this. I have a bunch of arcade buttons connected to a Teensy 4.1. Currently 16 but possibly around 40 eventually. Each one is fitted with a ws2812 pixel.
I'm wondering the best way to control these - I'll want to switch them on/off when pressed but maybe animations as well.
I've seen there is a non-blocking WS2812 library but it's a bit old. Is this the best way to go? Or do I need to put the buttons on interrupts or something?
I'd just like to start off on the right foot if possible!
Why would you need to use non-blocking WS2812 update? They update fast enough, you only have human input to respond to so interrupts won't be needed.
Well in the past I’ve missed sensor data when driving LEDs. Perhaps it will be ok with this small a number though. I’ll give it a go! Thanks
40 LEDs times 30µs means around 1.2ms blocked time for the LED update.
However OctoWS2811 or WS2812serial are great options with non-blocking functionality.