final project  1
servo.c File Reference

communication between bot and computer More...

#include "main.h"

Go to the source code of this file.

Macros

#define period   20
 
#define clockwise   319488
 
#define cclockwise   292096
 
#define TIMER4B_PRESCALER   50
 

Functions

void timer_init ()
 initializes the timer for the servo More...
 
void clock_timer_init (void)
 intializes the clock timer More...
 
void servo_init ()
 initializes the servo motor More...
 
void match_set (int match)
 sets match value More...
 
void servo_setAngle (double degrees)
 sets the servo angle More...
 

Variables

volatile int overflow
 
volatile int rise_time
 
volatile int fall_time
 
volatile int j
 
volatile float servo_angle
 

Detailed Description

communication between bot and computer

Author
Steven, Kynara, Saba, Bailey, Brett, Austin
Date
4/24/18

Definition in file servo.c.

Function Documentation

◆ clock_timer_init()

void clock_timer_init ( void  )

intializes the clock timer

intializes the clock timer

Definition at line 55 of file servo.c.

◆ match_set()

void match_set ( int  match)

sets match value

splits a match into 2 registers

Parameters
matchis value to match

Definition at line 105 of file servo.c.

◆ servo_init()

void servo_init ( )

initializes the servo motor

initializes the servo so that it can move

Definition at line 90 of file servo.c.

◆ servo_setAngle()

void servo_setAngle ( double  degrees)

sets the servo angle

Parameters
degreesis angle to set the servo to, adjusted for errors per bot

Definition at line 115 of file servo.c.

◆ timer_init()

void timer_init ( )

initializes the timer for the servo

initializes timer to send pulses to the servo

Definition at line 34 of file servo.c.