Grove - Finger-clip Heart Rate Sensor - With nodemcu esp 32 and logic converter channel 4

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);
}

What is the maximum voltage ESP32 can capture? Can it be applied to this sensor?

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);
}
Wire.begin(21,22); // sda, scl

Have you tested this setting? Does it work?

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);
}

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.