Servo outputs. More...
Functions | |
void | servo_init (void) |
void | servo_set_pos (uint8_t servo, uint16_t pos) |
void | servo_disable (uint8_t servo) |
The happyboard as 6 servo outputs.
Each servo has a 9bit register used to set it's position. Setting the servo to 0 will cause it to move to its counter-clockwise limit, while setting it to 511, will cause it to move to its clockwise limit.
void servo_disable | ( | uint8_t | servo | ) |
Disable servo - stops sending servo commands until the next servo_set_pos();
servo | Servo to disable |
void servo_init | ( | void | ) |
Initialize servos. Should not be called by user.
void servo_set_pos | ( | uint8_t | servo, |
uint16_t | pos | ||
) |
Set a servo's position.
servo | Servo to set. |
pos | New servo value (0..511) |