Example host software for the Maxim Integrated MAX30101 high sensitivity Heart Rate Monitor chip. Hosted on the MAX32630FTHR FeatherWing micro-controller board.

Dependencies:   MAX30101_Finger_Heart_Rate_SpO2_Monitor_Driver_Source_Code USBDevice max32630fthr

Fork of MAX30101_Heart_Rate_Sp02_Sensor_Chip by David Jung

Revision:
2:ac57776eee7d
Parent:
1:9bb3378a9060
--- a/main.cpp	Sat Jul 21 07:51:33 2018 +0000
+++ b/main.cpp	Sat Jul 21 09:33:16 2018 +0000
@@ -42,7 +42,7 @@
 DigitalOut bLED(LED3);
 #define MAX30101_I2C_SLAVE_ADDR (0xAE)
 MAX30101 HrSensor(P3_4, P3_5, MAX30101_I2C_SLAVE_ADDR);  // SDA, SCL, i2c 7-bit address
-    
+InterruptIn max30101_Interrupt(P3_2);    
 // main() runs in its own thread in the OS
 // (note the calls to Thread::wait below for delays)
 /**
@@ -68,7 +68,9 @@
     DigitalOut rLED(LED1, LED_OFF);
     DigitalOut gLED(LED2, LED_OFF);
     DigitalOut bLED(LED3, LED_OFF);
-
+    // MAX30101 initialize interrupt
+    fflush(stdout);
+    max30101_Interrupt.fall(&MAX30101::MidIntHandler);
     while (true) {  // Blink the blue-green LED 
         ret = HrSensor.i2c_reg_read(MAX30101::REG_ID,&value);
         if (value == 0x15) {