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.
Dependencies: mbed
Fork of StateMachine_1 by
IRSensor.h
00001 // Deklaration IR Sensoren 00002 // V04.18 00003 // V. Ahlers 00004 00005 00006 #ifndef IRSENSOR_H_ 00007 #define IRSENSOR_H_ 00008 00009 #include <cstdlib> 00010 #include <mbed.h> 00011 00012 class IRSensor { 00013 00014 public: 00015 IRSensor(AnalogIn& IrRight, AnalogIn& IrLeft, AnalogIn& IrFront, float dis2R, float dis2L, float dis2F); 00016 00017 float disR; 00018 float disL; 00019 float disF; 00020 int IrR; 00021 int IrL; 00022 int IrF; 00023 00024 float measR; 00025 float measL; 00026 float measF; 00027 00028 virtual ~IRSensor(); 00029 float readR(); 00030 float readL(); 00031 float readF(); 00032 int codeR(); 00033 int codeL(); 00034 int codeF(); 00035 00036 private: 00037 AnalogIn& IrRight; 00038 AnalogIn& IrLeft; 00039 AnalogIn& IrFront; 00040 float dis2R; 00041 float dis2L; 00042 float dis2F; 00043 static const float PR1; 00044 static const float PR2; 00045 static const float PR3; 00046 static const float PR4; 00047 static const float PR5; 00048 static const float PL1; 00049 static const float PL2; 00050 static const float PL3; 00051 static const float PL4; 00052 static const float PL5; 00053 static const float PF1; 00054 static const float PF2; 00055 static const float PF3; 00056 static const float PF4; 00057 static const float PF5; 00058 static const int minIrR; 00059 static const int minIrL; 00060 static const int minIrF; 00061 00062 }; 00063 00064 #endif /*IRSensor_H_*/
Generated on Wed Jul 13 2022 13:00:51 by
1.7.2
