From 67edc68d64df2f2b48564aefe75198536f1c5ee9 Mon Sep 17 00:00:00 2001 From: John Shaver Date: Wed, 12 Dec 2018 13:47:14 -0800 Subject: [PATCH] Tweaked the breathing slightly. --- runSchedule.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runSchedule.js b/runSchedule.js index ecdbaac..71ee991 100644 --- a/runSchedule.js +++ b/runSchedule.js @@ -1,6 +1,6 @@ const Gpio = require("pigpio").Gpio; const schedule = require("./schedule.json"); -const HZ = 10000; +const HZ = 40000; let ledRed = new Gpio(18, {mode: Gpio.OUTPUT}); let ledGreen = new Gpio(12, {mode: Gpio.OUTPUT}); @@ -51,7 +51,7 @@ let render = setInterval(() => { }, 50); function getBrightness(x) { - return Math.floor(breathingCurve(x, 5000, 100000, 1000000)); + return Math.floor(breathingCurve(x, 6000, 100000, 1000000)); } function breathingCurve(x, interval = 3000, min, max) {