TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 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 (136652 times)
  2. FAT32 Library (69879 times)
  3. Network Ethernet Library (55904 times)
  4. USB Device Library (46245 times)
  5. Network WiFi Library (41880 times)
  6. FT800 Library (41117 times)
  7. GSM click (28968 times)
  8. PID Library (26404 times)
  9. mikroSDK (26333 times)
  10. microSD click (25346 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 click

Rating:

8

Author: MIKROE

Last Updated: 2018-03-12

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: Biometrics

Downloaded: 9775 times

Followed by: 3 users

License: MIT license  

Heart Rate click carries a MAX30100 integrated pulse oximetry and heart-rate sensor. It’s an optical sensor that derives its readings from emitting two wavelengths of light from two LEDs, then measuring the absorbance of pulsing blood through a photodetector. Uses 3.3V power supply.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Heart rate click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Heart rate click" changes.

Do you want to report abuse regarding "Heart rate click".

  • mikroSDK Library 2.0.0.0
  • Comments (3)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Heart rate click

Heart rate click

Native view of the Heart rate click board.

View full image
Heart Rate click board

Heart Rate click board

Front and back side appearance of the Heart Rate click board.

View full image

Library Description Key functions:

  • uint8_t heartrate_readIrRed(uint16_t *ir_buff, uint16_t *red_buff ); - This function reads IR and RED values.
  • void heartrate_init(); - This function restarts and initializes the Heartrate chip.
  • uint8_t heartrateDataReady() - This function checks if the data is ready for reading.

Examples Description

  • System Initialization - Initializes GPIO INT as the input pin, I2C, and UART for logging.
  • Application Initialization - Initializes heartrate driver and Click board™.
  • Application Task - reading the value from both Ir and Red diode displaying their average values.
void applicationTask()
{
 if (heartrateDataReady()) 
 {
 sample_num = heartrate_readIrRed( &ir_buff, &red_buff ); 

 if ( sample_num >= 1 )
 {
 ir_average = 0;
 red_average = 0;

 for ( counter1 = 0; counter1 < sample_num; counter1++ )
 {
 ir_average += ir_buff[counter1];
 red_average += red_buff[counter1];
 } 
 ir_average /= sample_num;
 red_average /= sample_num;
 counter2++;

 if(counter2 > 100)
 {
 mikrobus_logWrite("Average value of Red LED sensor per 100 samples:",
_LOG_TEXT);
 WordToStr(red_average, text);
 mikrobus_logWrite(text,_LOG_LINE);
 mikrobus_logWrite("Average value of IR LED sensor per 100 samples:",
_LOG_TEXT);
 WordToStr(ir_average, text);
 mikrobus_logWrite(text,_LOG_LINE);
 counter2 = 0;
 }
 }
 }
}

Other mikroE Libraries used in the example:

  • UART
  • Conversions
  • I2C

Additional notes and information 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.  

 

ALSO FROM THIS AUTHOR

Buck 11 click

5

Buck 11 click is a high-efficiency step-down converter which provides 3.3V on its output, derived from the connected power supply voltage, in the range from 4.2V to 60V.

[Learn More]

Brushless 7 click

0

Brushless 7 Click is, as its name said, a motor driver based expansion board for controlling BLCD motors with any microcontroller.

[Learn More]

One Shot click

0

One Shot Click is equipped with the monostable multivibrator (also known as a “one-shot” pulse generator) with a programmable pulse width of 1μs to 33.6 seconds. The used LTC6993-2 is part of the TimerBlox® family of versatile silicon timing devices, from Analog Devices.

[Learn More]