leds/index.js

16 lines
249 B
JavaScript
Raw Normal View History

import * as server from './server.js';
2021-05-26 01:55:56 +00:00
import * as lights from './lights.js';
2021-05-26 00:32:56 +00:00
server.recv(
2021-05-26 01:55:56 +00:00
(res) => {
2021-05-26 03:18:02 +00:00
lights.set_pattern(JSON.parse(res));
2021-05-26 01:55:56 +00:00
},
(res) => {
console.log(`error callback: ${res}`);
}
);
2021-05-26 03:30:42 +00:00
while (true) {
lights.tick();
}