yys3
#1
Hi, I am working on the Grove Finger clip heart rate sensor. Does anyone have experience using it with nodemcu esp 32 [ESP32] and logic converter
Anyone can help ?
code
#include <Wire.h>
void setup() {
Serial.begin(115200);
Serial.println(“heart rate sensor: bpm :”);
//Wire.begin();
Wire.begin(21,22); // sda, scl
}
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);
}
Baozhu
#3
What is the maximum voltage ESP32 can capture? Can it be applied to this sensor?
yys3
#5
The code currently I’m using:
#include <Wire.h>
void setup() {
Serial.begin(115200);
Serial.println("heart rate sensor: bpm :");
//Wire.begin();
Wire.begin(21,22); // sda, scl
}
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);
}
Baozhu
#6
Wire.begin(21,22); // sda, scl
Have you tested this setting? Does it work?
yys3
#7
Hi, I have tested it. Unfortunately, it only prints:
heart rate sensor:
No heart beat rate detected.
Whereas the sensor lights did not power up, do u have any slightest idea why this happens?
UPDATE: I have tested it again, it does not print out anything now. Just empty/blank at the serial monitor.
Please help if u have happened to know how to solve this. Thanks in advance.
#include <Wire.h>
void setup() {
Serial.begin(9600);
Serial.println("your heart rate sensor a:");
//Serial.println(SDA);
//Serial.println(SCL);
//Wire.begin();
Wire.begin(21, 22);
}
void loop() {
Wire.requestFrom(0xA0 >> 1, 1); // request 1 bytes from slave device
//Wire.requestFrom(0x50 >> 1, 1); // 0x50 -> got it after using i2c scanner
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);
}
yys3
#8
Hi, may I request for the data sheet of this sensor?? I couldn’t find it from here Wiki_heartRateSensor
Hi, @yys3 We are sorry that we don’t have a datasheet of this sensor.