ECE4333 - 2018 - Ahmed & Brandon / Mbed OS ObjectFollower

Dependencies:   TPixy-Interface

Fork of PlayBack by ECE4333 - 2018 - Ahmed & Brandon

Committer:
asobhy
Date:
Thu Feb 01 03:58:00 2018 +0000
Revision:
0:a355e511bc5d
Child:
1:3e9684e81312
before testing the QEI

Who changed what in which revision?

UserRevisionLine numberNew contents of line
asobhy 0:a355e511bc5d 1
asobhy 0:a355e511bc5d 2 #ifndef MOTOR_DRIVER_H
asobhy 0:a355e511bc5d 3 #define MOTOR_DRIVER_H
asobhy 0:a355e511bc5d 4
asobhy 0:a355e511bc5d 5 //motor configuration
asobhy 0:a355e511bc5d 6 #define PERIOD 20000 // period in ms -> frequency = 50kHz -- audible frequency is between 20Hz - 20kHz
asobhy 0:a355e511bc5d 7
asobhy 0:a355e511bc5d 8 typedef enum { MOTOR_UNINIT,
asobhy 0:a355e511bc5d 9 MOTOR_INIT,
asobhy 0:a355e511bc5d 10 MOTOR_FORWARD,
asobhy 0:a355e511bc5d 11 MOTOR_REVERSE,
asobhy 0:a355e511bc5d 12 MOTOR_STOPPED
asobhy 0:a355e511bc5d 13 } motor_state_t;
asobhy 0:a355e511bc5d 14
asobhy 0:a355e511bc5d 15 motor_state_t motorDriver_init();
asobhy 0:a355e511bc5d 16 motor_state_t motorDriver_forward(int);
asobhy 0:a355e511bc5d 17 motor_state_t motorDriver_reverse(int);
asobhy 0:a355e511bc5d 18 motor_state_t motorDriver_stop();
asobhy 0:a355e511bc5d 19
asobhy 0:a355e511bc5d 20 #endif