---

Dependencies:   mbed

Fork of MicroMouse_MASTER_FIVE by PES2_R2D2.0

KontrastSensor.cpp

Committer:
TheDarkDurzo
Date:
2018-05-23
Revision:
11:8c8dba56bfda
Parent:
9:ab19796bf14a

File content as of revision 11:8c8dba56bfda:

#include <cmath>
#include "KontrastSensor.h"

using namespace std;

KontrastSensor::KontrastSensor(AnalogIn& kontrast, int& blackLine) :
    kontrast(kontrast),
    blackLine(blackLine)
{

}

KontrastSensor::~KontrastSensor() {}

void KontrastSensor::check()
{
    float k = kontrast*3300.0f; //sodass in Range bis 3300mV

    if(k >2500.0f){
        blackLine = 1;
    }
}