Arka Das
/
m3pi_HelloWorld
F
Fork of m3pi_HelloWorld by
main.cpp@8:d7fcb4946b5f, 2015-02-26 (annotated)
- Committer:
- arka
- Date:
- Thu Feb 26 20:44:11 2015 +0000
- Revision:
- 8:d7fcb4946b5f
- Parent:
- 7:d0689e8f23bf
F
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 | 7:d0689e8f23bf | 4 | m3pi m3pi; |
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 | 7:d0689e8f23bf | 14 | wait (0.5); // wait half a second |
chris | 7:d0689e8f23bf | 15 | m3pi.left(0.5); // Turn left at half speed |
chris | 7:d0689e8f23bf | 16 | wait (0.5); // wait half a second |
chris | 7:d0689e8f23bf | 17 | m3pi.backward(0.5);// Backward at half speed |
chris | 7:d0689e8f23bf | 18 | wait (0.5); // wait half a second |
chris | 7:d0689e8f23bf | 19 | m3pi.right(0.5); // Turn right at half speed |
chris | 7:d0689e8f23bf | 20 | wait (0.5); // wait half a second |
chris | 0:93bba564574a | 21 | |
chris | 7:d0689e8f23bf | 22 | m3pi.stop(); |
chris | 0:93bba564574a | 23 | } |