Lab 1 Task 2 example code

Dependencies:   mbed m3pi

Fork of 3pi_Lab1_Task2_Example1 by Craig Evans

Revision:
1:3143ad629ed8
Parent:
0:127d52afa7a9
Child:
2:b135039705fe
--- a/main.cpp	Thu Jun 22 12:59:06 2017 +0000
+++ b/main.cpp	Thu Jun 22 13:18:32 2017 +0000
@@ -10,7 +10,7 @@
 #include "m3pi.h"
 
 // API objects
-m3pi buggy;
+m3pi robot;
 AnalogIn pot_P(p15);
 
 // Function Prototypes
@@ -22,9 +22,9 @@
     init();
     
     // move cursor to position (0,0) - top-left
-    buggy.lcd_goto_xy(0,0);
+    robot.lcd_goto_xy(0,0);
     // print on the LCD - the number 5 is the number of characters in the string
-    buggy.lcd_print("Ex. 2",5);
+    robot.lcd_print("Ex. 2",5);
     
     // we will update the motors 50 times per second
     float dt = 1.0/50.0;
@@ -40,7 +40,7 @@
         // this gives full-speed backward (-1.0) to full-speed forward
         
         // set the speed of the left and right motors
-        buggy.motors(motor_speed,motor_speed);
+        robot.motors(motor_speed,motor_speed);
         
         // wait for a short time before repeating the loop
         wait(dt);
@@ -51,5 +51,5 @@
 // Functions
 void init()
 {
-    buggy.init();
+    robot.init();
 }
\ No newline at end of file