Library that can read an array of 8x3 reflectance sensors.

Dependencies:   DigitalInOut2

Dependents:   line_sensors_to_serial_24 R5

Fork of LineSensors by Jaime Martinez

LineSensors.h

Committer:
jmar11
Date:
2014-10-14
Revision:
0:acd430185ac0

File content as of revision 0:acd430185ac0:

#include "mbed.h"
#include "DigitalInOut2.h"

#ifndef LINESENSORS_H
#define LINESENSORS_H

class LineSensors{
    protected:
        PinName sensors[8][3];
        int sensVal[8][3];
        int thresh[8][3];
        Timer timer;
        uint32_t timeOut;
        
    public:
        LineSensors(PinName, PinName, PinName, PinName, PinName, PinName, PinName, PinName,
                    PinName, PinName, PinName, PinName, PinName, PinName, PinName, PinName,
                    PinName, PinName, PinName, PinName, PinName, PinName, PinName, PinName);
        void setThreshold();
        void read();
        void lineDetect(bool[8][3]);   
};

#endif