TOP Contributors

  1. MIKROE (2779 codes)
  2. Alcides Ramos (376 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (118 codes)
  5. Bugz Bensce (97 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (139563 times)
  2. FAT32 Library (72041 times)
  3. Network Ethernet Library (57254 times)
  4. USB Device Library (47615 times)
  5. Network WiFi Library (43219 times)
  6. FT800 Library (42556 times)
  7. GSM click (29930 times)
  8. mikroSDK (28292 times)
  9. PID Library (26930 times)
  10. microSD click (26309 times)
Libstock prefers package manager

Package Manager

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]

< Back
mikroSDK Library

Heart Rate 10 Click

Rating:

0

Author: MIKROE

Last Updated: 2024-10-31

Package Version: 2.1.0.14

mikroSDK Library: 2.0.0.0

Category: Biometrics

Downloaded: 341 times

Not followed.

License: MIT license  

Heart Rate 10 Click is a compact add-on board suitable for heart rate monitoring applications. This board features the MAX86916, an integrated optical sensor with applications in bio-sensing, proximity, and color from Maxim Integrated.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Heart Rate 10 Click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Heart Rate 10 Click" changes.

Do you want to report abuse regarding "Heart Rate 10 Click".

  • Information
  • Comments (0)

mikroSDK Library Blog


Heart Rate 10 Click

Heart Rate 10 Click is a compact add-on board suitable for heart rate monitoring applications. This board features the MAX86916, an integrated optical sensor with applications in bio-sensing, proximity, and color from Maxim Integrated.

heart_rate_10_click.png

Click Product page


Click library

  • Author : Luka Filipovic
  • Date : May 2021.
  • Type : I2C type

Software Support

We provide a library for the HeartRate10 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 HeartRate10 Click driver.

Standard key functions :

  • heartrate10_cfg_setup Config Object Initialization function.

    void heartrate10_cfg_setup ( heartrate10_cfg_t *cfg );
  • heartrate10_init Initialization function.

    HEARTRATE10_RETVAL heartrate10_init ( heartrate10_t *ctx, heartrate10_cfg_t *cfg );
  • heartrate10_default_cfg Click Default Configuration function.

    void heartrate10_default_cfg ( heartrate10_t *ctx );

Example key functions :

  • heartrate10_generic_write Writing function.

    err_t heartrate10_generic_write ( heartrate10_t *ctx, uint8_t reg, uint8_t tx_data )
  • heartrate10_reset Reset device.

    void heartrate10_reset ( heartrate10_t *ctx )
  • heartrate10_read_complete_fifo_data Read all led samples.

    err_t heartrate10_read_complete_fifo_data ( heartrate10_t *ctx, uint32_t *led1, uint32_t *led2, uint32_t *led3, uint32_t *led4 );

Example Description

This example showcases ability for device to read Heart Rate with 4 different diodes. There is IR, Red, Green and Blue. You can control every one of them individualy, and change theirs sequence in FIFO register. All leds data is read from FIFO register, it's 19bit data for every led.

The demo application is composed of two sections :

Application Init

Initialization of host communication periphrials and interrupt pin. Configures default configuration to device where device is reset, checks Part ID and enables all 4 leds and sets sequence as IR-Red-Green-Blue. Sets their power to maximum, and enables interrupt on new data ready.


void application_init ( void ) 
{
    log_cfg_t log_cfg;  /**< Logger config object. */
    heartrate10_cfg_t heartrate10_cfg;  /**< Click config object. */

    /** 
     * Logger initialization.
     * Default baud rate: 115200
     * Default log level: LOG_LEVEL_DEBUG
     * @note If USB_UART_RX and USB_UART_TX 
     * are defined as HAL_PIN_NC, you will 
     * need to define them manually for log to work. 
     * See @b LOG_MAP_USB_UART macro definition for detailed explanation.
     */
    LOG_MAP_USB_UART( log_cfg );
    log_init( &logger, &log_cfg );

    // Click initialization.
    heartrate10_cfg_setup( &heartrate10_cfg );
    HEARTRATE10_MAP_MIKROBUS( heartrate10_cfg, MIKROBUS_1 );
    if ( I2C_MASTER_ERROR == heartrate10_init( &heartrate10, &heartrate10_cfg ) ) 
    {
        log_error( &logger, " Initializtion." );
        log_info( &logger, " Please, run example again... " );

        for ( ; ; );
    }

    if ( HEARTRATE10_ERROR == heartrate10_default_cfg ( &heartrate10 ) ) 
    {
        log_error( &logger, " Configuration." );
        log_info( &logger, " Please, run example again... " );

        for ( ; ; );
    }

Application Task

Reads FIFO data for all 4 didoes and logs them with separation character ','.


void application_task ( void ) 
{   
    uint8_t rd_dat = 0;
    heartrate10_generic_read( &heartrate10, HEARTRATE10_REG_INT_STATUS, &rd_dat );
    if ( ( rd_dat & 0x40 ) )
    {        
        uint32_t ir, red, green, blue = 0;
        heartrate10_read_complete_fifo_data( &heartrate10, &ir, &red, &green, &blue );
        log_printf( &logger, "%lu,%lu,%lu,%lu\r\n", ir, red, green, blue );
    }
    Delay_ms ( 3 );
}

Note

For testing this example application SerialPlot was used. There you can see heart rate graphicly shown.

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.HeartRate10

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.


ALSO FROM THIS AUTHOR

WaterDetect click

10

Water Detect click is used for detecting water and other electroconductive liquids. All you need to do is splash or soak the upper part of the click board, and the output of Microchip's MCP606 compactor will go positive, signaling the presence of liquid.

[Learn More]

6DOF IMU 3 click

5

The 6 DOF IMU 3 Click is a Click board equipped with the FXOS8700CQ 6-axis sensor with integrated linear accelerometer and magnetometer.

[Learn More]

UART I2C/SPI click

5

UART I2C/SPI Click is an all-in-one solution which allows ESD-protected RS-232 connectivity to any embedded application while bridging the UART and I2C/SPI interfaces at the same time.

[Learn More]