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_V2 by
Diff: IRSensor.h
- Revision:
- 0:6d0671ae4648
- Child:
- 4:767fd282dd9c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/IRSensor.h Mon Apr 23 11:28:11 2018 +0000
@@ -0,0 +1,64 @@
+// Deklaration IR Sensoren
+// V04.18
+// V. Ahlers
+
+
+#ifndef IRSENSOR_H_
+#define IRSENSOR_H_
+
+#include <cstdlib>
+#include <mbed.h>
+
+ class IRSensor {
+
+ public:
+ IRSensor(AnalogIn& IrRight, AnalogIn& IrLeft, AnalogIn& IrFront, float dis2R, float dis2L, float dis2F);
+
+ float disR;
+ float disL;
+ float disF;
+ int IrR;
+ int IrL;
+ int IrF;
+
+ float measR;
+ float measL;
+ float measF;
+
+ virtual ~IRSensor();
+ float readR();
+ float readL();
+ float readF();
+ int codeR();
+ int codeL();
+ int codeF();
+
+ private:
+ AnalogIn& IrRight;
+ AnalogIn& IrLeft;
+ AnalogIn& IrFront;
+ float dis2R;
+ float dis2L;
+ float dis2F;
+ static const float PR1;
+ static const float PR2;
+ static const float PR3;
+ static const float PR4;
+ static const float PR5;
+ static const float PL1;
+ static const float PL2;
+ static const float PL3;
+ static const float PL4;
+ static const float PL5;
+ static const float PF1;
+ static const float PF2;
+ static const float PF3;
+ static const float PF4;
+ static const float PF5;
+ static const int minIrR;
+ static const int minIrL;
+ static const int minIrF;
+
+};
+
+#endif /*IRSensor_H_*/
