diff --git a/lights.js b/lights.js index a27e2c8..a35ba11 100644 --- a/lights.js +++ b/lights.js @@ -1,4 +1,4 @@ -import { Module } from 'rpi-ws281x' +import ws281x from 'rpi-ws281x' import * as fs from 'fs' const cfg = JSON.parse(fs.readFileSync('./config.json')); @@ -9,7 +9,7 @@ var pixel_cache = new Uint32Array(cfg.leds); var next_pattern = new Uint32Array(cfg.leds); var pattern = {} -Module.configure({ +ws281x.configure({ leds: cfg.leds || 300, brightness: cfg.brightness || 200, gpio: cfg.gpio || 18, @@ -46,7 +46,7 @@ export function tick() { if (!changed) { tick_pattern(); } - Module.render(pixels); + ws281x.render(pixels); } function fade(index) {