From 4c11d57a6c699c70eb64f1718aca48b00ac5d130 Mon Sep 17 00:00:00 2001 From: John Shaver Date: Thu, 13 Dec 2018 22:51:37 -0800 Subject: [PATCH] Converted Red interactions to all hardwarePWM. --- runSchedule.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/runSchedule.js b/runSchedule.js index 5b0c4a0..3bcbf81 100644 --- a/runSchedule.js +++ b/runSchedule.js @@ -8,6 +8,7 @@ const DEBUG = !!process.env["DEBUG"]; //Let's setup our connections to our physical hardware devices. let ledRed = new Gpio(12, {mode: Gpio.OUTPUT}); +ledRed.hardwarePwmWrite(HZ, 0); let ledGreen = new Gpio(13, {mode: Gpio.OUTPUT}); let napButton = new Gpio(6, {mode: Gpio.INPUT, pullUpDown: Gpio.PUD_UP, alert: true }); napButton.glitchFilter(10000); @@ -99,7 +100,7 @@ function render() { case "green": if(ledRed.getPwmDutyCycle()) { DEBUG && console.log("Turning off Red LED."); - return ledRed.digitalWrite(0); + return ledRed.hardwarePwmWrite(0); } if(!ledGreen.digitalRead()) { DEBUG && console.log("Turning on Green LED.");