diff --git a/lights.js b/lights.js index 59409da..923c8ab 100644 --- a/lights.js +++ b/lights.js @@ -22,11 +22,11 @@ export function set_pattern(pat) { function tick_pattern() { // do the parsing stuff here - var r = Math.floor(Math.random() * 100) - var g = Math.floor(Math.random() * 100); - var b = Math.floor(Math.random() * 100); for (let i = 0; i < cfg.leds; i++) { + var r = Math.floor(Math.random() * 100) + var g = Math.floor(Math.random() * 100); + var b = Math.floor(Math.random() * 100); next_pattern[i] = ((r << 8) + g) << 8 + b; } } @@ -43,7 +43,7 @@ export function tick() { tick_pattern(); } ws281x.render(pixels); - ws281x.sleep(10); + ws281x.sleep(500); } function fade(index) {