leds/index.js
2021-05-25 23:30:42 -04:00

16 lines
No EOL
249 B
JavaScript

import * as server from './server.js';
import * as lights from './lights.js';
server.recv(
(res) => {
lights.set_pattern(JSON.parse(res));
},
(res) => {
console.log(`error callback: ${res}`);
}
);
while (true) {
lights.tick();
}