pulse sensor library

Dependents:   Pedometer_ticker 4180_Fitbit_rtos 4180_Fitness_Tracker

Revision:
1:2d8deec7cae7
Parent:
0:e80a245c4d0d
--- a/PulseSensor.h	Sun Feb 09 15:37:19 2014 +0000
+++ b/PulseSensor.h	Tue Apr 21 22:52:00 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