Interface library for the Devantech SRF02/SRF08 ultrasonic i2c rangers. Depends on I2cRtosDriver lib!
Diff: Srf0208IF.cpp
- Revision:
- 3:70c946ba29cc
- Parent:
- 2:dfc8b09b4e3b
diff -r dfc8b09b4e3b -r 70c946ba29cc Srf0208IF.cpp --- a/Srf0208IF.cpp Sun May 26 20:52:27 2013 +0000 +++ b/Srf0208IF.cpp Sat Jun 01 07:40:00 2013 +0000 @@ -2,10 +2,8 @@ #include "Thread.h" #include "I2CMasterRtos.h" -#include "mbed.h" - using namespace mbed; -using namespace rtos; +using namespace rtos; bool Srf0208IF::triggerRanging() { @@ -16,7 +14,6 @@ { char result[2]; bool ok = !m_i2c.read(m_adr, 0x02, result, 2); - printf("%d %d \n",result[0],result[1]); return ok ? twoByte2int(result) : -1; } void Srf0208IF::resetI2CAdress(int newAddress)