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: Motordriver mbed-rtos mbed
Fork of MultiModalRobotSM by
MultiModalRobot/MultiModalRobot.h@15:9bc36f47c8cf, 2017-11-20 (annotated)
- Committer:
- baijun
- Date:
- Mon Nov 20 03:18:42 2017 +0000
- Revision:
- 15:9bc36f47c8cf
- Child:
- 20:e1a78ee68726
Same thing but with our new MultiModalRobot class.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| baijun | 15:9bc36f47c8cf | 1 | #ifndef MULTIMODALROBOT_H |
| baijun | 15:9bc36f47c8cf | 2 | #define MULTIMODALROBOT_H |
| baijun | 15:9bc36f47c8cf | 3 | |
| baijun | 15:9bc36f47c8cf | 4 | #include "motordriver.h" |
| baijun | 15:9bc36f47c8cf | 5 | |
| baijun | 15:9bc36f47c8cf | 6 | class MultiModalRobot { |
| baijun | 15:9bc36f47c8cf | 7 | private: |
| baijun | 15:9bc36f47c8cf | 8 | Motor& leftWheel; |
| baijun | 15:9bc36f47c8cf | 9 | Motor& rightWheel; |
| baijun | 15:9bc36f47c8cf | 10 | public: |
| baijun | 15:9bc36f47c8cf | 11 | MultiModalRobot(Motor& left, Motor& right); |
| baijun | 15:9bc36f47c8cf | 12 | void driveWheels(float leftSpeed, float rightSpeed); |
| baijun | 15:9bc36f47c8cf | 13 | void stop(float dutyCycle); |
| baijun | 15:9bc36f47c8cf | 14 | |
| baijun | 15:9bc36f47c8cf | 15 | }; |
| baijun | 15:9bc36f47c8cf | 16 | |
| baijun | 15:9bc36f47c8cf | 17 | #endif |
