Pi3B+, GrovePi+, Python & RGB LED Stick

It has been a long time since I did any work with interfacing electronics to processors, but with a sidestep to learn Python, came the whole idea of IoT, sensors and output devices.



I would like to interface the RGB LED Stick (10, 20 or 30 WS2813 mini LEDs) to the GrovePi+ using Python but have come upon a brick wall.



I noted that there is no Python demonstration code for the sticks, so I was going to look at creating some, but admit that I’m not even sure what commands to send, and how via the GrovePi+.



Could anyone give me a short sample that has:

[list]

  • Initialise stick
    Turn on LED (X)
    Set colour of LED (X)
    Turn off LED(x)
  • [/list]

    I know we need to send commands via the GrovePi+ which then sends the commands to the relevant GrovePi port (eg D8).



    Any help appreciated.



    I am creating a Repo on GitHub to house the “experiments” for each sensor that I have, and add more as I purchase them. Aim - to have at least one experiment for every GrovePi device.

    Hi,



    here you can find the example code for the WS2812B and Grove Pi+ in Python. please check and let me know the feedback.

    Can you please share the code