Skip to content
pjpmarques edited this page Dec 23, 2014 · 14 revisions

ChainableLED is an Arduino library compatible with Grove Chainable LED and the P9813 chip. It allows controlling a chain of LEDS individually. Supports both RGB and HSB color spaces for setting the color of each individual LED.

Installation

  1. Grab the latest version from the releases section of the GitHub repository.

  2. Unzip it to your Arduino "libraries" directory.

  3. It should be ready to use.

Library Interface

    class ChainableLED {
      public:
        ChainableLED(byte clk_pin, byte data_pin, byte number_of_leds);
    
        void init();
        void setColorRGB(byte led, byte red, byte green, byte blue);
        void setColorHSB(byte led, float hue, float saturation, float brightness);
     }

Examples

Three different examples are in included with the library:

  1. SimpleCycle: Video | Source Code

  2. FadeInOut: Video | Source Code

  3. CycleThroughColors: Video | Source Code

Clone this wiki locally