moves around

Dependencies:   m3pi mbed

Fork of m3pi_HelloWorld by Chris Styles

Committer:
devantormey
Date:
Mon Feb 26 22:09:37 2018 +0000
Revision:
8:379aed8af55f
Parent:
7:d0689e8f23bf
renamed;

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);
devantormey 8:379aed8af55f 9 m3pi.printf("Sup DSP");
chris 5:7619250a5b1d 10
chris 5:7619250a5b1d 11 wait (2.0);
chris 0:93bba564574a 12
devantormey 8:379aed8af55f 13 m3pi.forward(0.25); // Forward half speed
chris 7:d0689e8f23bf 14 wait (0.5); // wait half a second
devantormey 8:379aed8af55f 15 m3pi.right(0.25); // Turn left at half speed
devantormey 8:379aed8af55f 16 wait (0.25); // wait half a second
devantormey 8:379aed8af55f 17 m3pi.forward(0.5);// Backward at half speed
chris 7:d0689e8f23bf 18 wait (0.5); // wait half a second
devantormey 8:379aed8af55f 19 m3pi.right(0.25); // Turn right at half speed
devantormey 8:379aed8af55f 20 wait (0.25); // wait half a second
devantormey 8:379aed8af55f 21 m3pi.forward(0.5);// Backward at half speed
devantormey 8:379aed8af55f 22 wait (0.5);
devantormey 8:379aed8af55f 23 m3pi.right(0.25); // Turn left at half speed
devantormey 8:379aed8af55f 24 wait (0.25);
devantormey 8:379aed8af55f 25 m3pi.forward(0.5);// Backward at half speed
devantormey 8:379aed8af55f 26 wait (0.5);
devantormey 8:379aed8af55f 27 m3pi.right(0.25); // Turn left at half speed
devantormey 8:379aed8af55f 28 wait (0.25);
chris 7:d0689e8f23bf 29 m3pi.stop();
chris 0:93bba564574a 30 }