Compare commits
1 commit
333ed0aa2e
...
5c17a5b3f4
Author | SHA1 | Date | |
---|---|---|---|
5c17a5b3f4 |
1 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
||||||
import * as ws281x from 'rpi-ws281x'
|
import { Module } from 'rpi-ws281x'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
|
|
||||||
const cfg = JSON.parse(fs.readFileSync('./config.json'));
|
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 next_pattern = new Uint32Array(cfg.leds);
|
||||||
var pattern = {}
|
var pattern = {}
|
||||||
|
|
||||||
ws281x.configure({
|
Module.configure({
|
||||||
leds: cfg.leds || 300,
|
leds: cfg.leds || 300,
|
||||||
brightness: cfg.brightness || 200,
|
brightness: cfg.brightness || 200,
|
||||||
gpio: cfg.gpio || 18,
|
gpio: cfg.gpio || 18,
|
||||||
|
@ -46,7 +46,7 @@ export function tick() {
|
||||||
if (!changed) {
|
if (!changed) {
|
||||||
tick_pattern();
|
tick_pattern();
|
||||||
}
|
}
|
||||||
ws281x.render(pixels);
|
Module.render(pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
function fade(index) {
|
function fade(index) {
|
||||||
|
|
Loading…
Reference in a new issue