Rev | Line | |
---|
[244] | 1 | ChainableLED
|
---|
| 2 | ============
|
---|
| 3 |
|
---|
| 4 | Arduino library compatible with Grove Chainable LED and the P9813 chip. It allows controlling a chain of LEDS individually.
|
---|
| 5 |
|
---|
| 6 | Supports both RGB and HSB color spaces for setting the color of each individual LED.
|
---|
| 7 |
|
---|
| 8 | Compatible with [Particle devices](https://www.particle.io/).
|
---|
| 9 |
|
---|
| 10 | [More information on the wiki](https://github.com/pjpmarques/ChainableLED/wiki)
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 | Installation
|
---|
| 14 | ============
|
---|
| 15 | 1. Grab the latest version from the release section of GitHub.
|
---|
| 16 | (https://github.com/pjpmarques/ChainableLED/releases)
|
---|
| 17 |
|
---|
| 18 | 2. Unzip it to your Arduino "libraries" directory.
|
---|
| 19 |
|
---|
| 20 | 3. It should be ready to use. Examples are included.
|
---|
| 21 |
|
---|
| 22 |
|
---|
| 23 | Library Interface
|
---|
| 24 | =================
|
---|
| 25 | ```c++
|
---|
| 26 | class ChainableLED {
|
---|
| 27 | public:
|
---|
| 28 | ChainableLED(byte clk_pin, byte data_pin, byte number_of_leds);
|
---|
| 29 |
|
---|
| 30 | void init();
|
---|
| 31 | void setColorRGB(byte led, byte red, byte green, byte blue);
|
---|
| 32 | void setColorHSB(byte led, float hue, float saturation, float brightness);
|
---|
| 33 | }
|
---|
| 34 | ```
|
---|
Note:
See
TracBrowser
for help on using the repository browser.