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.
Fork of RD117_MBED by
Diff: MAX30102/MAX30102.cpp
- Revision:
- 6:519bdb0ec306
- Parent:
- 5:27d600e46926
--- a/MAX30102/MAX30102.cpp Tue Apr 10 03:36:39 2018 +0000
+++ b/MAX30102/MAX30102.cpp Sat Apr 14 20:04:56 2018 +0000
@@ -133,12 +133,14 @@
return false;
if(!maxim_max30102_write_reg(REG_FIFO_RD_PTR,0x00)) //FIFO_RD_PTR[4:0]
return false;
- //if(!maxim_max30102_write_reg(REG_FIFO_CONFIG,0x0f)) //sample avg = 1, fifo rollover=false, fifo almost full = 17
- if(!maxim_max30102_write_reg(REG_FIFO_CONFIG,0x4f)) // sample avg = 4
+ if(!maxim_max30102_write_reg(REG_FIFO_CONFIG,0x0f)) //sample avg = 1, fifo rollover=false, fifo almost full = 17
+ //if(!maxim_max30102_write_reg(REG_FIFO_CONFIG,0x4f)) // sample avg = 4
return false; // no adjacent samples are averaged, "pure" data, set to 0 samples left when next is called
if(!maxim_max30102_write_reg(REG_MODE_CONFIG,0x03)) //0x02 for Red only, 0x03 for SpO2 mode 0x07 multimode LED
return false; // no "shutdown control/power save mode" (bit 7), no reset (bit 6), spo2 mode, what is multimode LED?
if(!maxim_max30102_write_reg(REG_SPO2_CONFIG,0x27)) // SPO2_ADC range = 4096nA, SPO2 sample rate (100 Hz), LED pulseWidth (400uS)
+ // if(!maxim_max30102_write_reg(REG_SPO2_CONFIG,0x0f))// SPO2_ADC range = 2048nA, SPO2 sample rate (400 Hz), LED pulseWidth (400uS)
+ //if(!maxim_max30102_write_reg(REG_SPO2_CONFIG,0x2f))// SPO2_ADC range = 4096nA, SPO2 sample rate (400 Hz), LED pulseWidth (400uS)
//if(!maxim_max30102_write_reg(REG_SPO2_CONFIG,0x03)) // SPO2_ADC range = 2048nA, SPO2 sample rate (50 Hz), LED pulseWidth (400uS)
return false; //HIGHEST RESOLUTION

