Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SHARPIR.h
00001 /* mbed SHARPIR distance sensor 00002 * Copyright (c) 2010 Tomas Johansen 00003 * Released under the MIT License: http://mbed.org/license/mit 00004 */ 00005 00006 #ifndef MBED_SHARPIR_H 00007 #define MBED_SHARPIR_H 00008 00009 #include "mbed.h" 00010 00011 class SHARPIR { 00012 public: 00013 SHARPIR(PinName AnalogPort); 00014 float cm(); 00015 float inch(); 00016 float volt(); 00017 void calibrate(double reg, float exp, double lowerrange, double higherrange); 00018 00019 private: 00020 AnalogIn _analogin; 00021 double lowerrange; 00022 double higherrange; 00023 double reg; 00024 float exp; //trendline excel + datasheet 00025 }; 00026 00027 #endif
Generated on Sun Jul 17 2022 19:48:27 by
1.7.2