From 9e1c0f5be1f24e8806f4facbd7409fb91c538108 Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Tue, 25 May 2021 23:35:49 -0400 Subject: [PATCH] decrease render rate --- lights.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) {