Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for how to control a dotstar LED strip #6

Open
yakir12 opened this issue Apr 8, 2022 · 0 comments
Open

Add example for how to control a dotstar LED strip #6

yakir12 opened this issue Apr 8, 2022 · 0 comments

Comments

@yakir12
Copy link

yakir12 commented Apr 8, 2022

How can I use the SPI API here to control a DotStar LED strip?

To control a DorStar LED strip from an RPI I'd normally connect the LED strip to an Arduino via its SPI pins, the Arduino to the PI via a USB cable, and then have the PI tell the Arduino which LED to turn on/off by writing bytes into the serial port connected to the Arduino. The script on the Arduino would typically be very simple (e.g. read available bytes, turn on said LED).

This strikes me as overly complicated: since the PI can communicate with the LED strip directly via its own SPI pins, we could just cut out the Arduino-middleman. It should also be faster since now each instruction doesn't need to first go through a serial port (at a baud-rate of 9600 we add 1 millisecond per byte!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant