servo.h File Reference

Servo outputs. More...


Functions

void servo_init (void)
void servo_set_pos (uint8_t servo, uint16_t pos)

Detailed Description

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.


Function Documentation

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 position.

Parameters:
servo Servo to set.
pos New servo value (0..511)