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
Diff: Drivers/motor_driver.h
- Revision:
- 0:a355e511bc5d
- Child:
- 1:3e9684e81312
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Drivers/motor_driver.h Thu Feb 01 03:58:00 2018 +0000
@@ -0,0 +1,20 @@
+
+#ifndef MOTOR_DRIVER_H
+#define MOTOR_DRIVER_H
+
+//motor configuration
+#define PERIOD 20000 // period in ms -> frequency = 50kHz -- 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
\ No newline at end of file
