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 (136667 times)
  2. FAT32 Library (69901 times)
  3. Network Ethernet Library (55920 times)
  4. USB Device Library (46248 times)
  5. Network WiFi Library (41882 times)
  6. FT800 Library (41127 times)
  7. GSM click (28972 times)
  8. PID Library (26406 times)
  9. mikroSDK (26344 times)
  10. microSD click (25350 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: 9781 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

I2C Isolator 2 click

0

I2C Isolator 2 click provides I2C lines and power isolation for slave devices. It carries the ADM3260 dual I2C isolator with an integrated DC-to-DC converter. I2C Isolator 2 click is designed to run on either 3.3V or 5V power supply.

[Learn More]

Ammonia click

5

Ammonia click is an Ammonia detection (NH3) sensor, based on the MQ-137 gas sensor. This gas sensor has a sensitive layer made of SnO2, which changes its resistance when exposed to ammonia. The sensor is able to sense NH3 concentration in the range of 5 ppm to 200 ppm.

[Learn More]

MPU IMU click

0

Simple demonstration of using MPU 6000 6-axis motion device Example reads the 3-axis gyroscope, a 3-axis accelerometer and temperature sensor data and writes them to UART.

[Learn More]