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.
Fork of Versuch20 by
IRSensorG.cpp
00001 #include <cmath> 00002 #include "IRSensorG.h" 00003 00004 //------------------------------------------------------------------------------ 00005 00006 using namespace std; 00007 00008 IRSensorG::IRSensorG(AnalogIn& distance): 00009 00010 distance(distance) 00011 { 00012 00013 00014 } 00015 00016 IRSensorG::~IRSensorG() {} 00017 00018 //------------------------------------------------------------------------------ 00019 00020 int IRSensorG::read() 00021 { 00022 00023 00024 int d = 11/(distance)*exp(1.1534); 00025 00026 return d; 00027 00028 }
Generated on Sun Jul 17 2022 11:46:13 by
