heartrate11 2.0.0.0
Main Page

Heart Rate 11 click

‍Heart Rate 11 Click is a compact add-on board suitable for heart rate monitoring applications. This board features the OB1203, a multi-channel light sensor (LS/CS), a proximity sensor (PS), and a photoplethysmography sensor (PPG) from Renesas. It can be configured as an ambient light sensor to measure ambient light similar to the human eye experience or as an RGB color sensor. The OB1203 establishes communication to and from the module entirely through a standard I2C compatible interface and has a fully integrated biosensor for reflective photoplethysmography.

click Product page


Click library

  • Author : Stefan Filipovic
  • Date : Apr 2022.
  • Type : I2C type

Software Support

We provide a library for the Heart Rate 11 Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.

Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Library Description

‍This library contains API for Heart Rate 11 Click driver.

Standard key functions :

Example key functions :

Example Description

‍This example demonstrates the use of Heart Rate 11 click board by reading and displaying the PPG1 (HR) values which can be visualized on the SerialPlot application.

The demo application is composed of two sections :

Application Init

‍Initializes the driver and performs the click default configuration for heart rate measurement.

void application_init ( void )
{
log_cfg_t log_cfg;
heartrate11_cfg_t heartrate11_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
// Click initialization.
heartrate11_cfg_setup( &heartrate11_cfg );
HEARTRATE11_MAP_MIKROBUS( heartrate11_cfg, MIKROBUS_1 );
if ( I2C_MASTER_ERROR == heartrate11_init( &heartrate11, &heartrate11_cfg ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
if ( HEARTRATE11_ERROR == heartrate11_default_cfg ( &heartrate11 ) )
{
log_error( &logger, " Default configuration." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
#define HEARTRATE11_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition heartrate11.h:387
@ HEARTRATE11_ERROR
Definition heartrate11.h:435
void application_init(void)
Definition main.c:32

Application Task

‍Waits for the data ready interrupt, then reads the values of PPG from FIFO and displays it on the USB UART (SerialPlot) every 32ms approximately.

void application_task ( void )
{
// Wait for the data ready interrupt indication
while ( heartrate11_get_int_pin ( &heartrate11 ) );
uint32_t ppg;
if ( HEARTRATE11_OK == heartrate11_read_fifo ( &heartrate11, &ppg ) )
{
log_printf ( &logger, "%lu\r\n", ppg );
}
}
@ HEARTRATE11_OK
Definition heartrate11.h:434
void application_task(void)
Definition main.c:68

Note

‍We recommend using the SerialPlot tool for data visualizing.

The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.

Other Mikroe Libraries used in the example:

  • MikroSDK.Board
  • MikroSDK.Log
  • Click.HeartRate11

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. UART terminal is available in all MikroElektronika compilers.