Piano-LED-Visualizer icon indicating copy to clipboard operation
Piano-LED-Visualizer copied to clipboard

Support for non raspberry pi Linux GPIO?

Open sreich opened this issue 4 months ago • 2 comments

Hello, I am trying to evaluate how hard coded is the interface of LED visualizer into the gpio Linux system?

I'm not familiar yet with how this (GPIO LED) functions on linux, is there a standard interface that applications like this can use?

Or, is this totally hard coded for raspberry pi? What if I buy an alternative board like Radxa X4?

For context, I am speaking to the manual installation. And installing the LED visualizer on that board (after manual OS install) or an alternative board, and having the light LEDs work

Or would this require code changes? Or simply config changes?

sreich avatar Aug 23 '25 09:08 sreich

Hey! It's pretty much hardcoded for Raspberry Pi right now. Getting it to work on other boards would need significant code changes, not just config tweaks. The LED control is tightly coupled to RPi's specific hardware (using rpi_ws281x library), so porting it would basically mean rewriting the entire LED interface from scratch. I do have plans to make this more modular in the future, but that's a big change and not something I can tackle right now. I'm actually thinking of going a different route, by adding support for external USB LED controllers instead of trying to support each board separately. That way you could connect a USB controller to any device (Raspberry Pi, Banana Pi, Orange Pi, or even a regular PC) and it would just work. Seems like a much cleaner solution than maintaining separate drivers for every board out there. For now, I'd stick with Raspberry Pi if you want the most reliable experience.

onlaj avatar Aug 23 '25 13:08 onlaj

Okay thanks for your detailed explanation, happy to hear it's on your roadmap whenever you're able to

I did stumble upon https://github.com/vsergeev/python-periphery because I figured someone already potentially solved this problem, seems like something userspace should provide rather than every application that uses LEDs... Sounds like a lot of effort

That led controller support idea sounds like a nice approach too, to avoid having to support such individual drivers

But also for the user, plugging a USB led strip into whatever CPU they can find, would be pretty awesome vs the current complexity of pinouts and such. Could help increase adoption!

Just wanna say, your work is fantastic and I'm thankful that you've kept so active on this project and support, I know it's a lot of developer effort. It's awesome and helps breathe life into piano and learning

Lemme know if there's anything I can do to help (developer here), not being tied to raspberry pi would be a big value add for me personally as a current user of this

sreich avatar Aug 23 '25 15:08 sreich