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.
Diff: Actuator/Motor.h
- Revision:
- 0:3ead6014ad51
- Child:
- 1:d43df9a7cef2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Actuator/Motor.h Sun Nov 03 23:28:27 2019 +0000
@@ -0,0 +1,22 @@
+#ifndef MBED_MOTOR_H
+#define MBED_MOTOR_H
+
+#include "mbed.h"
+
+#define FORWARD 'f'
+#define BACKWARD 'b'
+#define BREAK 's'
+
+class Motor
+{
+private:
+ PwmOut IN1_, IN2_;
+ DigitalOut INH1_, INH2_;
+
+public:
+ Motor(PinName IN1, PinName IN2,PinName INH1, PinName INH2);
+
+ void setSpeed_percent(float percent, char direction);
+};
+
+#endif