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.
Diff: Sensor/HallSensor.h
- Revision:
- 0:c88a81d07287
diff -r 000000000000 -r c88a81d07287 Sensor/HallSensor.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Sensor/HallSensor.h	Wed Nov 06 01:17:46 2019 +0000
@@ -0,0 +1,25 @@
+#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
\ No newline at end of file