This is one of the demo programs for the MAX30003WING. This program records ECG data and prints the status register, calculated BPM, samples recorded and ETAG register value.
Dependencies: MAX30003 max32630fthr
Fork of MAX30003_Demo_Debug by
Revision 7:173935a3e036, committed 2017-12-14
- Comitter:
- johnGreeneMaxim
- Date:
- Thu Dec 14 21:46:48 2017 +0000
- Parent:
- 6:e380af098d52
- Child:
- 8:5087b009105f
- Commit message:
- Added a debug LED to toggle on when a FIFO overflow happens.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Thu Sep 07 18:26:48 2017 +0000
+++ b/main.cpp Thu Dec 14 21:46:48 2017 +0000
@@ -66,8 +66,7 @@
pc.baud(115200); // Baud rate = 115200
DigitalOut rLed(LED1, LED_OFF); // Debug LEDs
- DigitalOut gLed(LED2, LED_OFF);
- DigitalOut bLed(LED3, LED_OFF);
+
InterruptIn ecgFIFO_int(P5_4); // Config P5_4 as int. in for the
ecgFIFO_int.fall(&ecgFIFO_callback); // ecg FIFO almost full interrupt
@@ -134,6 +133,7 @@
// Check if FIFO has overflowed
if( ETAG[readECGSamples - 1] == FIFO_OVF ){
ecgAFE.writeRegister( MAX30003::FIFO_RST , 0); // Reset FIFO
+ rLed=1;
}
// Print results
