We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]
Rating:
Author: MIKROE
Last Updated: 2020-03-18
Package Version: 1.0.0.0
mikroSDK Library: 1.0.0.0
Category: Biometrics
Downloaded: 2951 times
Not followed.
License: MIT license
Heart Rate 2 Click is a Click board based on MAXM86161 a complete, integrated, optical data acquisition system, ideal for optical pulse oximetry and heart-rate detection applications.
Do you want to subscribe in order to receive notifications regarding "Heart Rate 2 click" changes.
Do you want to unsubscribe in order to stop receiving notifications regarding "Heart Rate 2 click" changes.
Do you want to report abuse regarding "Heart Rate 2 click".
Library Description
Library provides a full contol over Heart Rate 2 click. It provides generic functions for reading and writing, default configuration and reading fifo data, and if you are willing you can set your configuration.
Key functions:
uint8_t heartrate2_generic_read ( uint8_t reg_adr )
- Generic function for reading data.void heartrate2_generic_write ( uint8_t reg_adr, uint8_t write_data )
- Generic function for writing data.void heartrate2_default_configuration ( uint8_t cfg_led )
- Function for setting default config and turning on one led with cfg_led parameter.void heartrate2_read_fifo ( heartrate2_fifo_data_t *fifo )
- Function for reading fifo data and tag values from device.Examples description
The application is composed of three sections :
void application_task ( )
{
char demo_txt[ 30 ];
heartrate2_fifo_data_t fifo_object;
heartrate2_read_fifo( &fifo_object );
if ( fifo_object.tag == HEARTRATE2_FIFO_TAG_PPG1_LEDC1 )
{
LongWordToStr( fifo_object.data_val, demo_txt );
Ltrim( demo_txt );
Rtrim( demo_txt );
mikrobus_logWrite( demo_txt, _LOG_TEXT );
mikrobus_logWrite( ",", _LOG_TEXT );
LongWordToStr( counter_tm++, demo_txt );
Ltrim( demo_txt );
Rtrim( demo_txt );
mikrobus_logWrite( demo_txt, _LOG_LINE );
}
Delay_ms( 4 );
}
Other mikroE Libraries used in the example:
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.