/***************************************************************************
Arm.h
ME 218B Project Hats Off
Team Firefox
March 7, 2010
Upper arm stepper = PS2, PS3, PP0, PP2
Lower arm servo = Timer0 PT2, Timer 6
DDRT = 0x4;
//00000100 for servo
DDRP = 0x05;
//00000101 for stepper 1=output
DDRS = 0x0C;
//00001100 for stepper 1=output
***************************************************************************/
#ifndef Arm_h
#define Arm_h
/*-------------------------- Include Files
-----------------------------*/
#include <stdio.h>
#include <termio.h>
#include <hidef.h>
#include <mc9s12e128.h>
#include <bitdefs.h>
#include <S12E128bits.h>
#include
"S12eVec.h"
#include
"myTimer.h"
#include
"ADS12.h"
#include
"ME218_E128.h"
//included with main.c for E128
/* common defines and macros */
/* derivative information */
#pragma LINK_INFO DERIVATIVE "SampleS12"
/*-------------------------- Module Functions
-----------------------------*/
void
Arm_Init(void);
//Checks to see if the arm has stopped moving
char
isArmStopped(void);
//Swing the arm to the target height (either high or low)
void
swingArm(int targetNum);
//Set servo and stepper to attack position
void
goToAttackPosition(void);
//Set servo and stepper to home position
void
goToHomePosition(void);
//Checks if the arm has stopped waving.
char
isWaveStopped(void);
//Begin the wave sequence in the servo and stepper
void
waveArm(void);
#endif