spotify-now
Version:
spotify, rgb and bob.
19 lines • 841 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.start = void 0;
const tslib_1 = require("tslib");
const johnny_five_1 = require("johnny-five");
const handleColor_1 = require("../libs/arduino/handleColor");
function start(pins = [11, 10, 9], interval = 20) {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
const board = new johnny_five_1.Board({ repl: false });
board.on("ready", () => (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
const led = new johnny_five_1.Led.RGB({ pins });
yield (0, handleColor_1.handleColor)(led);
led.on();
board.loop(interval * 1000, () => (0, handleColor_1.handleColor)(led));
}));
});
}
exports.start = start;
//# sourceMappingURL=start.js.map