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 Roboshark_V62 by
IRSensor.h
00001 /*Roboshark V7 00002 IRSensor.h 00003 Erstellt: V. Ahlers 00004 geändert: V.Ahlers 00005 V.5.18 00006 */ 00007 00008 00009 #ifndef IRSENSOR_H_ 00010 #define IRSENSOR_H_ 00011 00012 #include <cstdlib> 00013 #include <mbed.h> 00014 00015 class IRSensor { 00016 00017 public: 00018 IRSensor(AnalogIn& IrRight, AnalogIn& IrLeft, AnalogIn& IrFront, float dis2R, float dis2L, float dis2F, AnalogIn& LineSensor); 00019 00020 float disR; 00021 float disL; 00022 float disF; 00023 int IrR; 00024 int IrL; 00025 int IrF; 00026 00027 float measR; 00028 float measL; 00029 float measF; 00030 double Line; 00031 00032 virtual ~IRSensor(); 00033 float readR(); 00034 float readL(); 00035 float readF(); 00036 int codeR(); 00037 int codeL(); 00038 int codeF(); 00039 void codeB(); 00040 int get_ende(); 00041 int ende; 00042 00043 private: 00044 AnalogIn& IrRight; 00045 AnalogIn& IrLeft; 00046 AnalogIn& IrFront; 00047 AnalogIn& LineSensor; 00048 float dis2R; 00049 float dis2L; 00050 float dis2F; 00051 int roundL; 00052 int roundR; 00053 int roundF; 00054 static const float PR1; 00055 static const float PR2; 00056 static const float PR3; 00057 static const float PR4; 00058 static const float PR5; 00059 static const float PL1; 00060 static const float PL2; 00061 static const float PL3; 00062 static const float PL4; 00063 static const float PL5; 00064 static const float PF1; 00065 static const float PF2; 00066 static const float PF3; 00067 static const float PF4; 00068 static const float PF5; 00069 static const int minIrR; 00070 static const int minIrL; 00071 static const int minIrF; 00072 static const float Period; 00073 double line; 00074 bool finish; 00075 bool finishLast; 00076 Ticker ticker; 00077 00078 }; 00079 00080 #endif /*IRSensor_H_*/
Generated on Sat Jul 16 2022 01:32:53 by
