GPYX sensor library
Fork of Sharp by
Diff: Sharp.cpp
- Revision:
- 2:e9ab384ccbab
- Parent:
- 1:a5ced48cfedc
--- a/Sharp.cpp Fri Mar 28 15:31:40 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -#include "Sharp.h" -#include "mbed.h" -#include "math.h" - -Sharp::Sharp( PinName voutPin ): -vout(voutPin) -{ -} - -double Sharp::getIRDistance(void) -{ - float dist = vout.read(); - - return 37.115*dist*dist-73.021*dist+43.451; -} \ No newline at end of file