DP

Dependencies:   FastAnalogIn mbed-rtos mbed

Fork of dipl_prace_v10 by Roman Krejci

ledsensor.h

Committer:
romankrej
Date:
2015-04-28
Revision:
1:28d74f044818
Parent:
0:f3b355df6f26

File content as of revision 1:28d74f044818:

#ifndef _ANGLE_H
#define _ANGLE_H

#include "mbed.h"
#include "rtos.h"
#include "FastAnalogIn.h"

class cLedSensor {
    public:     
        /* Constructor */
        cLedSensor(PinName pinAnalog);
        
        /* Desctructor*/
        ~cLedSensor();
        
        /* Get analog value of voltage */
        float getVoltage();
        
        /* This method reads analog value */
        void read();
        
        /* Pointer to collect thread */
        Thread* thread;
    
    private:
        /*Fast analogIn pin*/
        FastAnalogIn analog;
        
        float voltage;
        float volt_s[5];
        float volt_temp;
        int i;  
};
#endif