16 lines
No EOL
249 B
JavaScript
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();
|
|
} |