Team Lumberjack
/
m3pi_HelloWorld
Mircroprocessor revised code 9/22
Fork of m3pi_HelloWorld by
main.cpp@1:05bdd0697e72, 2010-11-02 (annotated)
- Committer:
- chris
- Date:
- Tue Nov 02 16:55:00 2010 +0000
- Revision:
- 1:05bdd0697e72
- Parent:
- 0:93bba564574a
- Child:
- 2:5a329194c74d
Changed the instance name from \"pi\" to \"m3pi\" for consistency
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 | 1:05bdd0697e72 | 4 | m3pi m3pi(p8,p9,p10); |
chris | 1:05bdd0697e72 | 5 | |
chris | 0:93bba564574a | 6 | |
chris | 0:93bba564574a | 7 | int main() { |
chris | 0:93bba564574a | 8 | |
chris | 1:05bdd0697e72 | 9 | |
chris | 1:05bdd0697e72 | 10 | |
chris | 1:05bdd0697e72 | 11 | pi.locate(0,1); |
chris | 1:05bdd0697e72 | 12 | pi.printf("LO World"); |
chris | 1:05bdd0697e72 | 13 | wait(5.0); |
chris | 0:93bba564574a | 14 | |
chris | 0:93bba564574a | 15 | pi.forward(0.5); |
chris | 0:93bba564574a | 16 | wait (0.5); |
chris | 0:93bba564574a | 17 | pi.left(0.5); |
chris | 0:93bba564574a | 18 | wait (0.5); |
chris | 0:93bba564574a | 19 | pi.backward(0.5); |
chris | 0:93bba564574a | 20 | wait (0.5); |
chris | 0:93bba564574a | 21 | pi.right(0.5); |
chris | 0:93bba564574a | 22 | wait (0.5); |
chris | 0:93bba564574a | 23 | |
chris | 0:93bba564574a | 24 | pi.stop(); |
chris | 0:93bba564574a | 25 | |
chris | 0:93bba564574a | 26 | } |