/* Standard Includes */ #include #include #include #define F_CPU 1000000UL /* Stock 1mHz rate */ #include /* Pin hookups defined here */ #define FRONT_MOTOR PB1 #define FRONT_MOTOR_OC OC1A #define FRONT_MOTOR_OC_REGISTER OCR1A #define REAR_MOTOR PB2 #define REAR_MOTOR_OC OC1B #define REAR_MOTOR_OC_REGISTER OCR1B /* Centering and Tweaking */ /* These values vary across motors -- tweak here to get it centered */ #define FRONT_CENTER 1340 #define REAR_CENTER 1400 #define SLEW_SCALE 6 /* Declares */ void init(void); int main(void); void turnFront(uint16_t, uint16_t); /* turns to location, waiting for specified milliseconds */ void turnRear(uint16_t, uint16_t); /* turns to location, waiting for specified milliseconds */ void walkForward(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t); /* front right, back right, front left, back left, pause */ void walkBackward(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t); /* front right, back left, front left, back right, pause */ void stand(void); /* centers for standing */