Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Sensor/HallSensor.h
- Committer:
- yeongsookim
- Date:
- 2020-10-31
- Revision:
- 1:d43df9a7cef2
- Parent:
- 0:3ead6014ad51
File content as of revision 1:d43df9a7cef2:
#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