leds/index.js

16 lines
274 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';
const cfg = require('./config.json');
global.cfg = cfg;
2021-05-26 00:32:56 +00:00
server.recv(
2021-05-26 01:55:56 +00:00
(res) => {
lights.parse_pattern(JSON.parse(res));
},
(res) => {
console.log(`error callback: ${res}`);
}
);