Code for Sprint 2

Dependencies:   C12832 mbed rtos RangeFinder

Revision:
23:7d29f2132197
Parent:
22:00a577f64930
Child:
26:71288f42dbc6
--- a/main.cpp	Thu Apr 23 11:00:40 2015 +0000
+++ b/main.cpp	Thu Apr 23 14:39:38 2015 +0000
@@ -24,6 +24,14 @@
 float outHoriz; // output to horizontal servo
 C12832 lcd(p5, p7, p6, p8, p11);// lcd is an object from class c12832 initialised by p5,p7....
 
+typedef enum {
+    searching,
+    tracking,
+    retreating
+} LampState;
+
+LampState lamp;
+
 /* parallax ultrasound range finder
 p21 pin the range finder is connected to.
 10 is Time of pulse to send to the rangefinder to trigger a measurement, in microseconds.
@@ -53,6 +61,7 @@
         lcd.locate(0,9);    // the location where you want your charater to be displayed
         lcd.printf("Vert: %0.3f, OutVert: %0.3f", corVert, outVert);
         Thread::wait(250);
+        mutex_sonar.unlock();
     }
 }