use fs to parse config instead

This commit is contained in:
jane 2021-05-25 23:24:00 -04:00
parent 7851830f62
commit 599561466a
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
import * as ws281x from 'rpi-ws281x'
import * as fs from 'fs'
const cfg = require('./config.json');
const cfg = JSON.parse(fs.readFileSync('./config.json'));
const fade_ticks = cfg.fade_ticks || 10;
var pixels = new Uint32Array(cfg.leds);