Hello world program that just gets the m3pi moving

Dependencies:   mbed m3pi

Committer:
chris
Date:
Fri May 13 10:51:57 2011 +0000
Revision:
7:d0689e8f23bf
Parent:
6:602fc2239837

        

Who changed what in which revision?

UserRevisionLine numberNew 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 }