Example to move the robot.

Dependencies:   m3pi mbed

Fork of 3pi_Line_Follow by Craig Evans

Revision:
2:ec75506e96a3
Parent:
1:d8c15d5b8eac
--- a/code.cpp	Tue Mar 20 16:37:12 2018 +0000
+++ b/code.cpp	Thu Mar 22 12:13:29 2018 +0000
@@ -3,7 +3,18 @@
 // code in here runs again and again
 void repeat()
 {
-   // put your code in between the { and } brackets
-   
+    // move both motors at 25% speed, the robot should move forwards
+    robot.left_motor(0.25);
+    robot.right_motor(0.25);
+
+    // carry on going forward for 2 seconds
+    wait(2.0);
 
-}
\ No newline at end of file
+    // make robot spin right (clock-wise)
+    robot.left_motor(0.25);
+    robot.right_motor(-0.25);
+    
+    // you can change this value to tune the turning angle
+    wait(0.5);
+
+}