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: max32630fthr USBDevice
Fork of MAXREFDES220_HEART_RATE_MONITOR 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.
Warning
The MAXREFDES220 source code listed is dated and only compatible with the 1.2.8a.msbl. The latest sample host source code is available on the MAX32664 website.
MAXREFDES220 FeatherWing Pinout Connections

Diff: Utilities/utils.h
- Revision:
- 5:e458409e913f
- Parent:
- 0:da5f5b56060a
--- a/Utilities/utils.h Thu May 24 14:51:55 2018 -0700 +++ b/Utilities/utils.h Thu May 24 14:54:28 2018 -0700 @@ -65,4 +65,37 @@ int parse_set_reg_cmd(const char* str, const char* dev_type, uint8_t* addr, uint8_t* val); int parse_set_reg_cmd(const char* str, const char* dev_type, uint8_t* addr, uint16_t* val); int parse_set_reg_cmd(const char* str, const char* dev_type, uint8_t* addr, uint32_t* val); + +/* + * @brief Parse data values sent by DeviceStudio command + * @details For a command format of "<cmd> <val1> <val2> ... <valN>", + * This command will parse val1 - valN into vals array + * + * @param[in] str - The full string received + * @param[in] cmd - The command only + * @param[out] vals - The output array of values + * @param[in] vals_sz - The maximum number of values the output array vals can hold + * @param[in] hex - Set to true for hexidecimal values, false for decimal + * + * @return -1 on error, otherwise the number of values parsed + */ +int parse_cmd_data(const char* str, const char* cmd, uint8_t *vals, int vals_sz, bool hex); +int parse_cmd_data(const char* str, const char* cmd, uint16_t *vals, int vals_sz, bool hex); +int parse_cmd_data(const char* str, const char* cmd, uint32_t *vals, int vals_sz, bool hex); + +/* + * @brief Determine if str2 is a substring of str1 beginning at idx 0 + * + * @param[in] str1 - The parent string + * @param[in] str2 - The substring which should exist starting at index 0 of str1 + * + * @return true if str1 starts with str2 + * + * Examples: + * str1 = "An apple", str2 = "An a", returns true + * str1 = "A dog", str2 = "A a", returns false + * str1 = "An apple", str2 = "An apple tree", returns false + */ +bool starts_with(const char* str1, const char* str2); + #endif

Heart Rate SpO2 Algorithm EvKit Health Monitor Development System Board MAXREFDES220