From f6a3f4a5f343c2bef615e243b5212066d05c28fc Mon Sep 17 00:00:00 2001 From: Dirk Jahnke Date: Wed, 15 Nov 2017 20:54:45 +0100 Subject: [PATCH] working version, simplified demo mode only --- fs/animateLights.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/fs/animateLights.js b/fs/animateLights.js index 4687cca..c62c6e7 100755 --- a/fs/animateLights.js +++ b/fs/animateLights.js @@ -17,10 +17,11 @@ let colors = { let LightAnimation = { - numberOfBulbs: 3, - ledPin: 4, + numberOfBulbs: 11, + ledPin: 2, running: false, mode: "demo", + generalBrightnessDivider: 3, colorSequence: [ colors.dimmedWhite, colors.red, @@ -42,11 +43,13 @@ let LightAnimation = { RPC.addHandler('HouseLightning.Start', function(args) { LightAnimation.running = true; + LightAnimation.mode = "run"; return {result: 'ok'}; }, null); RPC.addHandler('HouseLightning.Stop', function(args) { - LightAnimation.running = false; + LightAnimation.running = true; // first we want to turn off LEDs, thus needs stop-mode + LightAnimation.mode = "stop"; return {result: 'ok'}; }, null); @@ -111,7 +114,7 @@ function runNeopixel(strip, shiftBy) { for (i=0; i