Skip to content

Instantly share code, notes, and snippets.

@staroselskii
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save staroselskii/bc425bcbd3fc660f8fd9 to your computer and use it in GitHub Desktop.
Save staroselskii/bc425bcbd3fc660f8fd9 to your computer and use it in GitHub Desktop.
Simple servo example for Navio
while (true) {
for (int i = NAVIO_RCOUTPUT_1; i < NAVIO_RCOUTPUT_1 + 4; i++) {
pwm.setPWMmS(i, SERVO_MIN);
}
sleep(1);
for (int i = NAVIO_RCOUTPUT_1; i < NAVIO_RCOUTPUT_1 + 4; i++) {
pwm.setPWMmS(i, SERVO_MAX);
}
sleep(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment