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: motor.h
- Revision:
- 1:3ca91ad8e927
- Parent:
- 0:51c12cc34baf
- Child:
- 2:bc41daf2b0ce
diff -r 51c12cc34baf -r 3ca91ad8e927 motor.h
--- a/motor.h Thu Feb 01 12:59:21 2018 +0000
+++ b/motor.h Fri Dec 14 14:24:52 2018 +0000
@@ -4,12 +4,19 @@
class Motor
{
public:
- Motor(PinName pinName1, PinName pinName2);
+ Motor(PinName pinName1, PinName pinName2, PinName pinName3, PinName pinName4);
void Fwd(float time);
void Rev(float time);
+ void Stop(void);
+ int Speed(float speedA, float speedB);
void Period_in_ms(int msPeriod);
private:
PwmOut pin1;
PwmOut pin2;
+ PwmOut pin3;
+ PwmOut pin4;
};
+
+//int motor(float speedA, float speedB);
+
#endif