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
IRSensor.h
- Committer:
- ahlervin
- Date:
- 2018-04-24
- Revision:
- 4:767fd282dd9c
- Parent:
- 0:6d0671ae4648
File content as of revision 4:767fd282dd9c:
// 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, AnalogIn& LineSensor);
float disR;
float disL;
float disF;
int IrR;
int IrL;
int IrF;
float measR;
float measL;
float measF;
double Line;
virtual ~IRSensor();
float readR();
float readL();
float readF();
int codeR();
int codeL();
int codeF();
void codeB();
int get_ende();
int ende;
private:
AnalogIn& IrRight;
AnalogIn& IrLeft;
AnalogIn& IrFront;
AnalogIn& LineSensor;
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;
static const float Period;
double line;
bool finish;
bool finishLast;
Ticker ticker;
};
#endif /*IRSensor_H_*/
