![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
follow wall 1
Diff: SHARPIR.h
- Revision:
- 0:b703833f6795
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SHARPIR.h Tue Apr 08 13:23:06 2014 +0000 @@ -0,0 +1,27 @@ +/* mbed SHARPIR distance sensor + * Copyright (c) 2010 Tomas Johansen + * Released under the MIT License: http://mbed.org/license/mit + */ + +#ifndef MBED_SHARPIR_H +#define MBED_SHARPIR_H + +#include "mbed.h" + +class SHARPIR { +public: + SHARPIR(PinName AnalogPort); + float cm(); + float inch(); + float volt(); + void calibrate(double reg, float exp, double lowerrange, double higherrange); + +private: + AnalogIn _analogin; + double lowerrange; + double higherrange; + double reg; + float exp; //trendline excel + datasheet +}; + +#endif \ No newline at end of file