led pwm

parent ad04d25a
Showing with 7 additions and 2 deletions
......@@ -9,8 +9,8 @@ var Gpio = require('pigpio').Gpio;
*/
var RED = new Gpio(4, {mode: Gpio.OUTPUT});
//var GREEN = new Gpio(17, 'out');
//var BLUE = new Gpio(27, 'out');
var GREEN = new Gpio(17, {mode: Gpio.OUTPUT});
var BLUE = new Gpio(27, {mode: Gpio.OUTPUT});
var dutyCycle = 0;
......@@ -23,6 +23,11 @@ setInterval(function () {
}
}, 20);
RED.pwmWrite(dutyCycle);
GREEN.pwmWrite(dutyCycle);
BLUE.pwmWrite(dutyCycle);
/*
WEB SERVER
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment