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.
Dependencies: USBDevice max32630fthr
Fork of MAXREFDES220# by
Finger Heart Rate Monitor and SpO2 Monitor
The MAXREFDES220 Smart Sensor FeatherWing board is a integrated solution for providing finger-based heart rate measurements and SpO2 (blood oxygen saturation). This evaluation board interfaces to the host computer using the I2C interface. Heart rate outpu is available in beats per minute (BPM) and SpO2 is reported in percentages.; the PPG (photoplethysmography) raw data is also available. The board has an MAX30101 chip which is a low power heart rate monitor with adjustable sample rates and adjustable LED currents. The low cost MAX32664 microcontroller is pre-flashed with C code for finger-based pulse rate and SpO2 monitoring. Bootloader software is included to allow for future algorithms or updates to the algorithm from Maxim Integrated.
Ordering information will be available soon.
Note: SpO2 values are not calibrated. Calibration should be performed using the final end product.
MAXREFDES220 FeatherWing Pinout Connections

Diff: Interfaces/SmartSensor/SSInterface.cpp
- Revision:
- 1:7a55c0c7d6d9
- Parent:
- 0:da5f5b56060a
--- a/Interfaces/SmartSensor/SSInterface.cpp	Wed Apr 11 16:01:32 2018 -0700
+++ b/Interfaces/SmartSensor/SSInterface.cpp	Wed Apr 11 16:42:37 2018 -0700
@@ -526,8 +526,8 @@
 {
 	assert_msg((data_type >= 0) && (data_type <= 3), "Invalid value for data_type");
 	uint8_t cmd_bytes[] = { SS_FAM_W_COMMCHAN, SS_CMDIDX_OUTPUTMODE };
-	uint8_t data_bytes[] = { (sc_en ? SS_MASK_OUTPUTMODE_SC_EN : 0) |
-							((data_type << SS_SHIFT_OUTPUTMODE_DATATYPE) & SS_MASK_OUTPUTMODE_DATATYPE) };
+	uint8_t data_bytes[] = { (uint8_t)((sc_en ? SS_MASK_OUTPUTMODE_SC_EN : 0) |
+							((data_type << SS_SHIFT_OUTPUTMODE_DATATYPE) & SS_MASK_OUTPUTMODE_DATATYPE)) };
 
 	SS_STATUS status = write_cmd(&cmd_bytes[0], ARRAY_SIZE(cmd_bytes),
 								&data_bytes[0], ARRAY_SIZE(data_bytes));
@@ -664,7 +664,7 @@
 		int sample_size;
 		fifo_sample_size(data_type, &sample_size);
 
-		int bytes_to_read = num_samples * sample_size + 1; //+1 for status byte
+		size_t bytes_to_read = num_samples * sample_size + 1; //+1 for status byte
 		if (bytes_to_read > sizeof(databuf)) {
 			//Reduce number of samples to read to fit in buffer
 			num_samples = (sizeof(databuf) - 1) / sample_size;
    
 Heart Rate SpO2 Algorithm EvKit Health Monitor Development System Board MAXREFDES220
            Heart Rate SpO2 Algorithm EvKit Health Monitor Development System Board MAXREFDES220