version for edu_robot TM

Dependents:   EduRobot

Fork of SRF02 by Roberto D'Amico

Revision:
2:9da88e2889b6
Parent:
1:6b978ea41787
--- a/SRF02.h	Fri Dec 16 14:09:37 2011 +0000
+++ b/SRF02.h	Wed Feb 26 08:29:45 2014 +0000
@@ -28,9 +28,6 @@
 
 #include "mbed.h"
 
-#define INCHES_RESULT       0x50    // For result in inches
-#define CENTIMETERS_RESULT  0x51    // For result in centimeters
-#define MICROSECONDS_RESULT 0x52    // For result in micro-seconds
 /** Library for the SRF02 Ultrasonic Ranger Sensor, using the I2C bus for the
  * comunication. Remeber that sensor can function in serial mode if MODE pin
  * is connected to the ground, but this libary not support this mode.
@@ -41,7 +38,7 @@
  *  #include "mbed.h"
  *  #include "SRF02.h"
  *  // Create instance of class SRF02 for device at address 0xE0 and take mesure in cm
- *  SRF02 srf02(p28, p27, 0xE0, 1);
+ *  SRF02 srf02(p28, p27, 0xE0, 0x51);
  *  DigitalOut led1(LED1);
  * 
  *  int main() 
@@ -59,13 +56,13 @@
 class SRF02
 {
     public:
-        enum measure_type{INCHES=0x050,CENTIMETERS=0x51,MICROSECONDS=0x52};
+        //enum _typem{INCHES=0x050,CENTIMETERS=0x51,MICROSECONDS=0x52};
         /** Creates an instance of class. Setting the pin used for I2C, the address of device and the measure range type.
          *
          * @param sda A pin used for SDA I2C signal.
          * @param scl A pin used for SCL I2C signal.
          * @param addr The address of I2C SRF02 device.
-         * @param measure_type The of mesure response (0-inches,1-centimeters,2-micro-seconds).
+         * @param measure_type The of mesure response (0x50-inches,0x51-centimeters,0x52-micro-seconds).
          */
         SRF02(PinName sda, PinName scl, int addr, char type);