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.
motor.h@0:51c12cc34baf, 2018-02-01 (annotated)
- Committer:
- martinsimpson
- Date:
- Thu Feb 01 12:59:21 2018 +0000
- Revision:
- 0:51c12cc34baf
- Child:
- 1:3ca91ad8e927
First Commit
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| martinsimpson | 0:51c12cc34baf | 1 | #ifndef _MOTOR_H_ |
| martinsimpson | 0:51c12cc34baf | 2 | #define _MOTOR_H_ |
| martinsimpson | 0:51c12cc34baf | 3 | #include "mbed.h" |
| martinsimpson | 0:51c12cc34baf | 4 | class Motor |
| martinsimpson | 0:51c12cc34baf | 5 | { |
| martinsimpson | 0:51c12cc34baf | 6 | public: |
| martinsimpson | 0:51c12cc34baf | 7 | Motor(PinName pinName1, PinName pinName2); |
| martinsimpson | 0:51c12cc34baf | 8 | void Fwd(float time); |
| martinsimpson | 0:51c12cc34baf | 9 | void Rev(float time); |
| martinsimpson | 0:51c12cc34baf | 10 | void Period_in_ms(int msPeriod); |
| martinsimpson | 0:51c12cc34baf | 11 | private: |
| martinsimpson | 0:51c12cc34baf | 12 | PwmOut pin1; |
| martinsimpson | 0:51c12cc34baf | 13 | PwmOut pin2; |
| martinsimpson | 0:51c12cc34baf | 14 | }; |
| martinsimpson | 0:51c12cc34baf | 15 | #endif |