Library for interfacing the SRF08 ultrasonic range sensor. Most functions of the SRF08 are covered, including interrupt-based waiting for the ranging process to finish

Dependents:   Project6

Fork of SRF08 by Brent Dekker

Revision:
5:abd72648aa5d
Parent:
4:a11bd4ea3c18
diff -r a11bd4ea3c18 -r abd72648aa5d SRF08.h
--- a/SRF08.h	Wed Jul 11 08:11:34 2012 +0000
+++ b/SRF08.h	Sun May 10 01:55:56 2015 +0000
@@ -25,6 +25,10 @@
 
 #include "mbed.h"
 
+#define INCHES 0x50 //Ranging Mode - Result in inches
+#define CM  0x51 //Ranging Mode - Result in centimeters
+#define US  0x52 //Ranging Mode - Result in micro-seconds
+
 /**
  * The SRF08 is an ultrasonic range finder with an I2C interface that allows 
  * the measurement to be read directly in centimetres. More information can be
@@ -46,7 +50,7 @@
     /**
      * Send the "Start ranging in cm" command via I2C
      */
-    void startRanging();
+    void startRanging(char rangingType);
     
     /**
      * Checks if the module has finished ranging