Yeongsoo Kim / Mbed 2 deprecated Mecha_Speed_control

Dependencies:   mbed

Sensor/HallSensor.h

Committer:
yeongsookim
Date:
2019-11-06
Revision:
0:c88a81d07287

File content as of revision 0:c88a81d07287:

#ifndef MBED_HallSensor_H
#define MBED_HallSensor_H

#include "mbed.h"

#define PI 3.141592


class HallSensor
{
public:
    HallSensor(PinName a);
    
    int getPinState ();
    float getSpeed_rps();

protected:
    void risingCallback();

    InterruptIn m_hallSensor;
    Timer m_timer_sec;
    float m_period_sec;
};

#endif