Datasheet
6
5. Usage
The following sketch demonstrates a simple application of using the Ear-clip Heart Rate Sensor to measure
heart rate.
Connect this module to the digital port D2 on Grove-Base shield. And connect Grove-LED to
Digital port 4.
Plug the Base Shield into Arduino/Seeeduino.
Copy and paste code below to a new Arduino sketch.
// Function: This program can be used to measure heart rate, the lowest
pulse in the program be set to 30.
// Use an external interrupt to measure it.
// Hardware: Grove - Ear-clip Heart Rate Sensor, Grove - Base Shield,
Grove - LED
// Arduino IDE: Arduino-1.0
// Author: FrankieChu
// Date: Jan 22, 2013
// Version: v1.0
// by www.seeedstudio.com
#define LED 4//indicator, Grove - LED is connected with D4 of Arduino
boolean led_state = LOW;//state of LED, each time an external interrupt