I bought this one and I followed up tutorial but it’s not work . the wire.request never sent back any values.
so, i try to check addr with scanner then i found that it’s 0x50 instead of 0xA0 (from code tutorial). So, i try wire.request again with new addr that i just found. the result was the same it never sent back any values.
All of these, i could say my wiring are ok (because esp32 found addr of grove) and also grove no any short circuit(using multimeter). So how can i fix this ?
this ref for tutorial : https://wiki.seeedstudio.com/Grove-Finger-clip_Heart_Rate_Sensor/
my code:
#include <Wire.h>
void setup() {
Serial.begin(115200);
Serial.println("heart rate sensor:");
Wire.begin (21, 22);
}
void loop() {
Wire.requestFrom(0x50 >> 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);
}
Fak Supakrit is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.