---
Dependencies: mbed
Fork of MicroMouse_MASTER_FIVE by
Diff: KontrastSensor.cpp
- Revision:
- 9:ab19796bf14a
- Parent:
- 7:5ef09519a6e9
diff -r 1c8a747c49c8 -r ab19796bf14a KontrastSensor.cpp --- a/KontrastSensor.cpp Wed May 16 12:15:23 2018 +0000 +++ b/KontrastSensor.cpp Wed May 16 16:41:44 2018 +0000 @@ -3,28 +3,20 @@ using namespace std; -//IRSensor::IRSensor(AnalogIn& distance, DigitalOut& bit0, DigitalOut& bit1, DigitalOut& bit2, int number) : -// distance(distance), bit0(bit0), bit1(bit1), bit2(bit2) KontrastSensor::KontrastSensor(AnalogIn& kontrast, int& blackLine) : kontrast(kontrast), blackLine(blackLine) { - // this->number = number; + } KontrastSensor::~KontrastSensor() {} void KontrastSensor::check() { + float k = kontrast*3300.0f; //sodass in Range bis 3300mV - - float k = kontrast*3300.0f; //sodass in Range bis 3300mV - //printf("%.0f\n\r", k); - if(k >2500.0f){ blackLine = 1; } - //else{//Auschalten im Betrieb (nur zur Kontrolle) - // blackLine = 0; - //} }