![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Mircroprocessor revised code 9/22
Fork of m3pi_HelloWorld by
main.cpp@3:f1b80fdc708c, 2010-11-07 (annotated)
- Committer:
- chris
- Date:
- Sun Nov 07 10:41:34 2010 +0000
- Revision:
- 3:f1b80fdc708c
- Parent:
- 2:5a329194c74d
- Child:
- 5:7619250a5b1d
Updated to latest library
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 | 1:05bdd0697e72 | 8 | |
chris | 1:05bdd0697e72 | 9 | |
chris | 2:5a329194c74d | 10 | m3pi.locate(0,1); |
chris | 2:5a329194c74d | 11 | m3pi.printf("LO World"); |
chris | 1:05bdd0697e72 | 12 | wait(5.0); |
chris | 0:93bba564574a | 13 | |
chris | 2:5a329194c74d | 14 | m3pi.forward(0.5); |
chris | 0:93bba564574a | 15 | wait (0.5); |
chris | 2:5a329194c74d | 16 | m3pi.left(0.5); |
chris | 0:93bba564574a | 17 | wait (0.5); |
chris | 2:5a329194c74d | 18 | m3pi.backward(0.5); |
chris | 0:93bba564574a | 19 | wait (0.5); |
chris | 2:5a329194c74d | 20 | m3pi.right(0.5); |
chris | 0:93bba564574a | 21 | wait (0.5); |
chris | 0:93bba564574a | 22 | |
chris | 2:5a329194c74d | 23 | m3pi.stop(); |
chris | 0:93bba564574a | 24 | |
chris | 0:93bba564574a | 25 | } |