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: mbed
Fork of RCControlOOP by
Mousr.h@0:78e2af20cbf3, 2014-09-08 (annotated)
- Committer:
- mfillinois
- Date:
- Mon Sep 08 11:32:04 2014 +0000
- Revision:
- 0:78e2af20cbf3
- Child:
- 2:e9042e88abf1
RC OOP code for mini-shield mouse. Only basic RC function at this time.
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mfillinois | 0:78e2af20cbf3 | 1 | #pragma once |
| mfillinois | 0:78e2af20cbf3 | 2 | #include "mbed.h" |
| mfillinois | 0:78e2af20cbf3 | 3 | class Mousr |
| mfillinois | 0:78e2af20cbf3 | 4 | { |
| mfillinois | 0:78e2af20cbf3 | 5 | public: |
| mfillinois | 0:78e2af20cbf3 | 6 | Mousr(); |
| mfillinois | 0:78e2af20cbf3 | 7 | void stop(); |
| mfillinois | 0:78e2af20cbf3 | 8 | void straight(float speed); |
| mfillinois | 0:78e2af20cbf3 | 9 | void backwards(float speed); |
| mfillinois | 0:78e2af20cbf3 | 10 | void left(float speed); |
| mfillinois | 0:78e2af20cbf3 | 11 | void right(float speed); |
| mfillinois | 0:78e2af20cbf3 | 12 | void flipLeft(); |
| mfillinois | 0:78e2af20cbf3 | 13 | void flipRight(); |
| mfillinois | 0:78e2af20cbf3 | 14 | float getStraightSpeed(); |
| mfillinois | 0:78e2af20cbf3 | 15 | float getRotateSlowSpeed(); |
| mfillinois | 0:78e2af20cbf3 | 16 | float getRotateSpeed(); |
| mfillinois | 0:78e2af20cbf3 | 17 | float getRotateFastSpeed(); |
| mfillinois | 0:78e2af20cbf3 | 18 | |
| mfillinois | 0:78e2af20cbf3 | 19 | private: |
| mfillinois | 0:78e2af20cbf3 | 20 | PwmOut m1a; |
| mfillinois | 0:78e2af20cbf3 | 21 | PwmOut m1b; |
| mfillinois | 0:78e2af20cbf3 | 22 | PwmOut m2a; |
| mfillinois | 0:78e2af20cbf3 | 23 | PwmOut m2b; |
| mfillinois | 0:78e2af20cbf3 | 24 | |
| mfillinois | 0:78e2af20cbf3 | 25 | float straightSpeed; |
| mfillinois | 0:78e2af20cbf3 | 26 | float rotateSlowSpeed; |
| mfillinois | 0:78e2af20cbf3 | 27 | float rotateSpeed ; |
| mfillinois | 0:78e2af20cbf3 | 28 | float rotateFastSpeed; |
| mfillinois | 0:78e2af20cbf3 | 29 | float flipStraightSpeed; |
| mfillinois | 0:78e2af20cbf3 | 30 | float flipStraightWait; |
| mfillinois | 0:78e2af20cbf3 | 31 | float flipRotateSpeed; |
| mfillinois | 0:78e2af20cbf3 | 32 | float flipRotateWait; |
| mfillinois | 0:78e2af20cbf3 | 33 | }; |
| mfillinois | 0:78e2af20cbf3 | 34 |
