complete

Dependencies:   4DGL-uLCD-SE PinDetect mbed

Fork of my2036lab2robotLCD by jim hamblen

Revision:
1:5a1311f0ea06
Parent:
0:343fbeea672c
--- a/Robot.h	Fri Jan 23 13:47:32 2015 +0000
+++ b/Robot.h	Sun Nov 06 22:25:24 2016 +0000
@@ -1,28 +1,30 @@
+#include <iostream>
+using namespace std;
+
 class Robot
 {
 public:
     void draw() {
-//needs code here
-    }
+        uLCD.filled_circle(xPosition, yPosition, 2, BLUE);
+        uLCD.filled_circle(xPosition - 8, yPosition - 8, 4, GREEN);    
+        uLCD.filled_circle(xPosition + 8, yPosition - 8, 4, GREEN);    
+        uLCD.filled_rectangle(xPosition - 5, yPosition + 10, xPosition + 5, yPosition + 5 , BLACK); 
+        uLCD.circle(xPosition, yPosition, 18, BLACK);    }
     void erase() {
-//needs code here
-    }
+        uLCD.filled_rectangle(0, 126, 126, 26, RED);    }
     void moveForward(int distance) {
-//needs code here
-    }
+        yPosition++;    }
     void moveBackward(int distance) {
-//needs code here
-    }
+        yPosition--;    }
     void moveLeft(int distance) {
-//needs code here
-    }
+        xPosition--;    }
     void moveRight(int distance) {
-//needs code here
-    }
-//needs code to init x,y
+        xPosition++;    }
     Robot() {
+        xPosition = 63;
+        yPosition = 63;
     }
 private:
     int xPosition;
     int yPosition;
-};
+};
\ No newline at end of file