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.");