WS2801-Pi
Search…
onBrightnessChanged
Defines a callback that gets called every time the brightness gets changed.

Parameters‌

  • callback The function that should get called every time the brightness was changed. (number) => void | Promise<void>

Example

1
ledController.onLedStripChanged((brightness) => {
2
console.log(brightness)
3
});
4
5
ledController.setBrightness(0);
Copied!
Last modified 10mo ago
Copy link