heartrate6  2.0.0.0
Main Page

Heart rate 6 click

Heart rate 6 Click is an optical biosensor Click boardâ„¢ designed for heart-rate monitoring (HRM). This Click boardâ„¢ employs a specialized sensor that incorporates two LED drivers and photo-sensing elements which are the most sensitive to green light.

click Product page


Click library

Software Support

We provide a library for the HeartRate6 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 form compilers IDE(recommended way), or downloaded from our LibStock, or found on mikroE github account.

Library Description

This library contains API for HeartRate6 Click driver.

Standard key functions :

Example key functions :

Examples Description

The example demonstrates the use of Heart rate 6 Click board.

The demo application is composed of two sections :

Application Init

Initializes interface and performs the device configuration and reset.

void application_init ( void )
{
log_cfg_t log_cfg;
// Logger initialization.
log_cfg.level = LOG_LEVEL_DEBUG;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, "---- Application Initializing ----" );
// Click initialization.
HEARTRATE6_MAP_MIKROBUS( cfg, MIKROBUS_1 );
heartrate6_init( &heartrate6, &cfg );
Delay_ms( 500 );
heartrate6_default_cfg( &heartrate6 );
Delay_ms( 500 );
log_printf( &logger, " Heart rate 6 is initialized \n");
i = 0;
}

Application Task

Waits until measurement cycle is finished and data is ready. Then reads the LED Data values and > performs the data plotting on serial plot, or logging on uart.

void application_task ( void )
{
heartrate6_wait_measure( &heartrate6 );
heartrate6_get_data( &heartrate6, &led_data_off, &led_data_on );
plot_res( led_data_on );
}

Note

Uart baud rate should be as high as possible, then data plotting will be better. The new measurement cycle is started when command for measurement starting is sent, or when register 0x57 is read out. Also the pressure on sensor must be same for the all measurement time. This is very important to device can work properly.

The full application code, and ready to use projects can be installed directly form compilers IDE(recommneded) or found on LibStock page or mikroE GitHub accaunt.

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.