leds/index.js

16 lines
272 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) => {
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}`);
}
);