Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

irled.h

Committer:
kyleliangus
Date:
2017-04-28
Revision:
4:b5b7836ca2b0
Child:
5:7e1e4cc19044

File content as of revision 4:b5b7836ca2b0:

#ifndef IRLED_H
#define IRLED_H

#include "mbed.h"

#define samplesToTake 1000

class IrLed
{
    public:
        IrLed( PinName pin ) : ir( pin ) 
        {
            calibrateSensor();
        }
        
        float getSamples( int i );
        
    private:
        void calibrateSensor();
        
        // internal values
        DigitalOut ir;
        float sensorAvg;
};



#endif