ManualControl
Dependencies: TPixy-Interface
Fork of MbedOS_Robot_Team by
Drivers/motor_driver_r.h@29:83c103d12078, 2018-04-10 (annotated)
- Committer:
- asobhy
- Date:
- Tue Apr 10 20:54:37 2018 +0000
- Branch:
- ManualControl
- Revision:
- 29:83c103d12078
- Parent:
- 9:fe56b888985c
ManualControl
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
asobhy | 9:fe56b888985c | 1 | /******************************************************************************/ |
asobhy | 9:fe56b888985c | 2 | // ECE4333 |
asobhy | 9:fe56b888985c | 3 | // LAB Partner 1: Ahmed Sobhy - ID: 3594449 |
asobhy | 9:fe56b888985c | 4 | // LAB Partner 2: Brandon Kingman - ID: 3470444 |
asobhy | 9:fe56b888985c | 5 | // Project: Autonomous Robot Design |
asobhy | 9:fe56b888985c | 6 | // Instructor: Prof. Chris Diduch |
asobhy | 9:fe56b888985c | 7 | /******************************************************************************/ |
asobhy | 9:fe56b888985c | 8 | |
asobhy | 9:fe56b888985c | 9 | #ifndef MOTOR_DRIVER_R_H |
asobhy | 9:fe56b888985c | 10 | #define MOTOR_DRIVER_R_H |
asobhy | 9:fe56b888985c | 11 | |
asobhy | 9:fe56b888985c | 12 | //motor configuration |
asobhy | 9:fe56b888985c | 13 | #define PERIOD_R 40 // period in us -> frequency = 25kHz -- audible frequency is between 20Hz - 20kHz |
asobhy | 9:fe56b888985c | 14 | |
asobhy | 9:fe56b888985c | 15 | typedef enum { MOTOR_UNINIT, |
asobhy | 9:fe56b888985c | 16 | MOTOR_INIT, |
asobhy | 9:fe56b888985c | 17 | MOTOR_FORWARD, |
asobhy | 9:fe56b888985c | 18 | MOTOR_REVERSE, |
asobhy | 9:fe56b888985c | 19 | MOTOR_STOPPED |
asobhy | 9:fe56b888985c | 20 | } motor_state_t; |
asobhy | 9:fe56b888985c | 21 | |
asobhy | 9:fe56b888985c | 22 | motor_state_t motorDriver_R_init(); |
asobhy | 9:fe56b888985c | 23 | motor_state_t motorDriver_R_forward(int); |
asobhy | 9:fe56b888985c | 24 | motor_state_t motorDriver_R_reverse(int); |
asobhy | 9:fe56b888985c | 25 | motor_state_t motorDriver_R_stop(); |
asobhy | 9:fe56b888985c | 26 | |
asobhy | 9:fe56b888985c | 27 | #endif |