Mircroprocessor revised code 9/22

Dependencies:   m3pi mbed

Fork of m3pi_HelloWorld by Chris Styles

Committer:
chris
Date:
Wed Nov 10 09:05:39 2010 +0000
Revision:
5:7619250a5b1d
Parent:
3:f1b80fdc708c
Child:
6:602fc2239837
Updated to latest m3pi library

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 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 5:7619250a5b1d 13 m3pi.forward(1.0); // 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 }