opentvc
Functions
Servo Library

Functions

void servoInit (void)
 
void servoWriteY (signed int angle)
 
void servoWriteZ (signed int angle)
 
void servoAttach (uint16_t port)
 
signed long map (signed long angle, unsigned long in_min, unsigned long in_max, unsigned long out_min, unsigned long out_max)
 

Detailed Description

This library contains all the neccessary code for controlling the two servos needed for pitch and yaw.

Function Documentation

signed long map ( signed long  angle,
unsigned long  in_min,
unsigned long  in_max,
unsigned long  out_min,
unsigned long  out_max 
)

Ardunio like map function. Re-maps a number from one range to another. That is, a value of fromLow would get mapped to toLow, a value of fromHigh to toHigh, values in-between to values in-between, etc.

void servoAttach ( uint16_t  port)

Flip port bit on to attach servo for usage.

void servoInit ( void  )

Configures 16 bit PWM Registers for 50Hz

void servoWriteY ( signed int  angle)

This function writes angle values to the Y axis for pitch.

void servoWriteZ ( signed int  angle)

This function writes angle values to the Z axis for yaw.