servo test

parent ecb4e89d
Showing with 5 additions and 3 deletions
......@@ -16,7 +16,7 @@ var motor = new Gpio(13, {mode: Gpio.OUTPUT}),
pulseWidth = 1000,
increment = 100;
setInterval(function () {
/*var test = setInterval(function () {
motor.servoWrite(pulseWidth);
pulseWidth += increment;
......@@ -25,10 +25,12 @@ setInterval(function () {
} else if (pulseWidth <= 1000) {
increment = 100;
}
}, 1000);
}, 1000);*/
motor.servoWrite(pulseWidth);
// Clean LEDs
motor.servoWrite(1000);
//RED.pwmWrite(dutyCycle);
//GREEN.pwmWrite(dutyCycle);
//BLUE.pwmWrite(dutyCycle);
......
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