Hi, everyone. I have been working on a project that connect nodemcu esp32 with dfrobot heart rate sensor link and I just can’t get any value being display on the app. There’s only 3 wires that connect between the nodemcu esp 32 and dfrobot heart rate sensor. I also been following the tutorial from this youtube videotutorial esp8266 but it wont work on my app, just no value display. ps: I have tested it on esp8266 too but it won’t work as the video shown). I have been struggling, any help with be appreciated.
Here as follows
nodemcu esp 32 ------------------ Dfrobot heart rate sensor
GND ----------------- GND
3.3v ----------------- VCC
GPIO 32 ----------------- Signal
• Smartphone OS - Redmi K20 Pro[MIUI 11.0.8 ] / Xiao Mi A2 Lite (Tested on both devices)
• Blynk Library version : v.0.6.1
• Code:
#define heartratePin 32
#include "DFRobot_Heartrate.h"
#include <WiFi.h>
#include <WiFiClient.h>
#include <BlynkSimpleEsp32.h>
DFRobot_Heartrate heartrate(DIGITAL_MODE); ///< ANALOG_MODE or DIGITAL_MODE
BlynkTimer timer;
char auth[] = "zSgIpS-vRCeOEohVzuHWlaVpBNl5eaxG";
char ssid[] = "Gummya";
char pass[] = "testtest1";
void setup() {
Serial.begin(115200);
Blynk.begin(auth, ssid, pass);
timer.setInterval(2000L, sendUptime);
}
void sendUptime() {
uint8_t rateValue;
heartrate.getValue(heartratePin); ///< A1 foot sampled values
rateValue = heartrate.getRate(); ///< Get heart rate value
if(rateValue) {
Blynk.virtualWrite(V98,rateValue);
Serial.println(rateValue);
}
//delay(20);
}
void loop() {
Blynk.run();
timer.run();
}
Anyone are welcome to comment if you happen to have any idea to tackle this issue. Thanks in advance.
Regards
yys100