UNPKG

@ginden/blinkstick-v2

Version:
24 lines 631 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Led = void 0; /** * Class to control a single LED on a Blinkstick device. * @category Implementation details */ class Led { constructor(blinkstick, index) { this.blinkstick = blinkstick; this.index = index; } setColor(red, green, blue) { return this.blinkstick.setColor(red, green, blue, { index: this.index }); } getColor() { return this.blinkstick.getColor(this.index); } turnOff() { return this.setColor(0, 0, 0); } } exports.Led = Led; //# sourceMappingURL=led.js.map