Library for pulse sensor to be used in embedded pedometer device

Revision:
1:bb658291fa96
Parent:
0:e80a245c4d0d
diff -r e80a245c4d0d -r bb658291fa96 PulseSensor.h
--- a/PulseSensor.h	Sun Feb 09 15:37:19 2014 +0000
+++ b/PulseSensor.h	Fri Apr 10 23:57:44 2020 +0000
@@ -17,6 +17,7 @@
 class PulseSensor
 {
     private:
+        volatile bool proc;
         volatile int rate[10];                    // used to hold last ten IBI values
         volatile unsigned long sampleCounter;          // used to determine pulse timing
         volatile unsigned long lastBeatTime;           // used to find the inter beat interval
@@ -54,6 +55,7 @@
          * @param   callbackRateMs Rate at which the printDataCallback is to be called, recommended is 20ms for graphing of pulse signal.
          */
         PulseSensor(PinName analogPin, void (*printDataCallback)(char,int), int callbackRateMs=20);
+        PulseSensor(PinName analogPin);
         
         /** Destructor */
         ~PulseSensor();
@@ -67,6 +69,8 @@
          * @return true if reading is stopped, false if reading was already stopped.
          */
         bool stop();
+        
+        int get_BPM();
 };
 
 #endif
\ No newline at end of file