Dear Seeed -Community, I would like my sensor to inform me on serial monitor whenever there is a “pulse beat” -so I can link this up with an LED that is supposed to light up with every beat- and not to show the calculated heartrate as it does now. Thus my question: Can this device return raw data from sensor or only calculated heart rate and what code commands would I have to use?
Currently I am using:
#include <Wire.h>
void setup() {
Serial.begin(9600);
Serial.println("heart rate sensor:");
Wire.begin();
}
void loop() {
Wire.requestFrom(0xA0 >> 1, 1); // request 1 bytes from slave device
while(Wire.available()) { // slave may send less than requested
unsigned char c = Wire.read(); // receive heart rate value (a byte)
Serial.println(c, DEC); // print heart rate value
}
delay(500);
}
Many thanks
Isa