connecting grove heart rate finger clip sensor to esp32

Can't find a proper forum to drop the topic, drop here.

Moderators: lily.li, violet

Post Reply
vik.bessems
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Mon May 06, 2019 4:28 am

connecting grove heart rate finger clip sensor to esp32

Post by vik.bessems » Mon May 06, 2019 4:42 am

Hi there,

I'm currently doing a project and wanted to use a heart rate module combined with my huzzah32 (esp32).
I'm connecting the module to the dedicated SDA and SCL pins on the huzzah and I added a 4.7K ohm pull-up to both the signal lines.
On a I2C scanner the module shows up with address 0x50.

Now I seem to be getting a connection for a while but after a couple of readings the connection just dies :(
If you have any clue feel free to reply.

Module test code:

Code: Select all

#include <Wire.h>
void setup() {
    Serial.begin(115200);
    delay(1000); // read on some post it worked magically for some people
    Serial.println("heart rate sensor:");
    Wire.begin(23,22);
}
void loop() {
  Wire.requestFrom(0x50, 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);
    }
    
}

Post Reply