Yeongsoo Kim / Mbed 2 deprecated Mecha_Speed_control

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers HallSensor.h Source File

HallSensor.h

00001 #ifndef MBED_HallSensor_H
00002 #define MBED_HallSensor_H
00003 
00004 #include "mbed.h"
00005 
00006 #define PI 3.141592
00007 
00008 
00009 class HallSensor
00010 {
00011 public:
00012     HallSensor(PinName a);
00013     
00014     int getPinState ();
00015     float getSpeed_rps();
00016 
00017 protected:
00018     void risingCallback();
00019 
00020     InterruptIn m_hallSensor;
00021     Timer m_timer_sec;
00022     float m_period_sec;
00023 };
00024 
00025 #endif