Colour sensors calibrated

Dependencies:   mbed-rtos mbed Servo QEI

Fork of ICRSEurobot13 by Thomas Branch

Sensors/Colour/Phototransistor.h

Committer:
twighk
Date:
2013-04-03
Revision:
4:1be0f6c6ceae
Parent:
3:717de74f6ebd

File content as of revision 4:1be0f6c6ceae:

#ifndef __Phototransistor_h__
#define __Phototransistor_h__

// Eurobot13 Phototransistor.h

class Phototransistor{
    private:
    AnalogIn ain;
    
    public:
    Phototransistor(PinName analogInPin)
        : ain (analogInPin)
        {   }
        
    float read() {return ain.read();}    
    operator float() {return read();}
    
};

#endif