WS2801-Pi
Search…
onLedStripChanged
Defines a callback that gets called every time the LED strip gets rendered (via show).

Parameters‌

Example

1
ledController.onLedStripChanged((ledStrip) => {
2
console.log(ledStrip)
3
});
4
5
const ledStrip = [{
6
red: 255,
7
green: 0,
8
blue: 0,
9
},
10
{
11
red: 255,
12
green: 255,
13
blue: 0,
14
},
15
{
16
red: 0,
17
green: 255,
18
blue: 255,
19
}];​
20
21
ledController.setLedStrip(ledStrip);
Copied!
Last modified 9mo ago
Copy link