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.
Fork of m3pi_HelloWorld by
main.cpp@6:602fc2239837, 2010-11-10 (annotated)
- Committer:
- chris
- Date:
- Wed Nov 10 09:07:39 2010 +0000
- Revision:
- 6:602fc2239837
- Parent:
- 5:7619250a5b1d
- Child:
- 7:d0689e8f23bf
Fixed typo
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| chris | 0:93bba564574a | 1 | #include "mbed.h" |
| chris | 0:93bba564574a | 2 | #include "m3pi.h" |
| chris | 0:93bba564574a | 3 | |
| chris | 3:f1b80fdc708c | 4 | m3pi m3pi(p23,p9,p10); |
| chris | 0:93bba564574a | 5 | |
| chris | 0:93bba564574a | 6 | int main() { |
| chris | 0:93bba564574a | 7 | |
| chris | 2:5a329194c74d | 8 | m3pi.locate(0,1); |
| chris | 2:5a329194c74d | 9 | m3pi.printf("LO World"); |
| chris | 5:7619250a5b1d | 10 | |
| chris | 5:7619250a5b1d | 11 | wait (2.0); |
| chris | 0:93bba564574a | 12 | |
| chris | 6:602fc2239837 | 13 | m3pi.forward(0.5); // Forward half speed |
| chris | 5:7619250a5b1d | 14 | wait (0.5); // For half a second |
| chris | 2:5a329194c74d | 15 | m3pi.left(0.5); |
| chris | 0:93bba564574a | 16 | wait (0.5); |
| chris | 2:5a329194c74d | 17 | m3pi.backward(0.5); |
| chris | 0:93bba564574a | 18 | wait (0.5); |
| chris | 2:5a329194c74d | 19 | m3pi.right(0.5); |
| chris | 0:93bba564574a | 20 | wait (0.5); |
| chris | 0:93bba564574a | 21 | |
| chris | 2:5a329194c74d | 22 | m3pi.stop(); |
| chris | 0:93bba564574a | 23 | |
| chris | 0:93bba564574a | 24 | } |
