Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: TPixy-Interface
Fork of ManualControlFinal by
Drivers/motor_driver.h
- Committer:
- asobhy
- Date:
- 2018-02-19
- Revision:
- 8:a0890fa79084
- Parent:
- 1:3e9684e81312
File content as of revision 8:a0890fa79084:
/******************************************************************************/
// ECE4333
// LAB Partner 1: Ahmed Sobhy - ID: 3594449
// LAB Partner 2: Brandon Kingman - ID: 3470444
// Project: Autonomous Robot Design
// Instructor: Prof. Chris Diduch
/******************************************************************************/
#ifndef MOTOR_DRIVER_H
#define MOTOR_DRIVER_H
//motor configuration
#define PERIOD 40 // period in us -> frequency = 25kHz -- audible frequency is between 20Hz - 20kHz
typedef enum { MOTOR_UNINIT,
MOTOR_INIT,
MOTOR_FORWARD,
MOTOR_REVERSE,
MOTOR_STOPPED
} motor_state_t;
motor_state_t motorDriver_init();
motor_state_t motorDriver_forward(int);
motor_state_t motorDriver_reverse(int);
motor_state_t motorDriver_stop();
#endif
