Skip to content

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

@yakir12

Description

@yakir12

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!).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions