From 5c17a5b3f4ab89cc1709c7ca13a005cfa81356bd Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Tue, 25 May 2021 23:26:59 -0400 Subject: [PATCH 1/2] ? --- lights.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lights.js b/lights.js index a644d8d..a27e2c8 100644 --- a/lights.js +++ b/lights.js @@ -1,4 +1,4 @@ -import * as ws281x from 'rpi-ws281x' +import { Module } 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 = {} -ws281x.configure({ +Module.configure({ leds: cfg.leds || 300, brightness: cfg.brightness || 200, gpio: cfg.gpio || 18, @@ -46,7 +46,7 @@ export function tick() { if (!changed) { tick_pattern(); } - ws281x.render(pixels); + Module.render(pixels); } function fade(index) { From 333ed0aa2e582290799c7f1c695163fcc5495c8c Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Tue, 25 May 2021 23:26:59 -0400 Subject: [PATCH 2/2] ? --- lights.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lights.js b/lights.js index a644d8d..a27e2c8 100644 --- a/lights.js +++ b/lights.js @@ -1,4 +1,4 @@ -import * as ws281x from 'rpi-ws281x' +import { Module } 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 = {} -ws281x.configure({ +Module.configure({ leds: cfg.leds || 300, brightness: cfg.brightness || 200, gpio: cfg.gpio || 18, @@ -46,7 +46,7 @@ export function tick() { if (!changed) { tick_pattern(); } - ws281x.render(pixels); + Module.render(pixels); } function fade(index) {