Last active
August 29, 2015 14:02
-
-
Save rwaldron/79d666fb5cbebfab25fe to your computer and use it in GitHub Desktop.
Calibrating a continuous servo and external power warning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var five = require("johnny-five"); | |
var board = new five.Board(); | |
board.on("ready", function() { | |
/* | |
Assuming a continuous servo is attached to pin 9, | |
this program can be called as: | |
node calibrate-servo.js | |
or | |
node calibrate-servo.js [some PWM pin number] | |
*/ | |
var servo = new five.Servo({ | |
pin: process.argv[2] || 9, | |
type: "continuous" | |
}); | |
servo.center(); | |
/* | |
Centering a continuous servo should stop | |
the horn from moving, ie. completely still. | |
If the horn is still moving while this program | |
is running, use a small screw driver to adjust | |
the trim pot until the horn is still. The trim | |
pot will be exposed on the side of the servo | |
*/ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks sir, I now should get a continuous servo asap :)