Used command byte to return distance in inches.

Dependents:   2ndYearProject-DistanceSensor

Fork of SRF02 by Craig Evans

Revision:
1:8e6587d88773
Parent:
0:b729d2ce03bd
Child:
2:45d62ec49ee9
--- a/SRF02.h	Sun Mar 08 14:15:29 2015 +0000
+++ b/SRF02.h	Sun Mar 08 14:21:40 2015 +0000
@@ -58,10 +58,24 @@
 {
 public:
 
+    /** Create a SRF02 object connected to the specified I2C pins
+    *
+    * @param sdaPin - mbed SDA pin 
+    * @param sclPin - mbed SCL pin
+    * 
+    */
     SRF02(PinName sdaPin, PinName sclPin);
+    /** Read distance in centimetres
+    *
+    * @returns distance in centimetres (int)
+    * 
+    */
     int getDistanceCm();
 
 private:
+    /** Hangs in infinite loop flashing 'blue lights of death'
+    *
+    */ 
     void error();