Hello everybody, i’m working on a pulse sensor and I want to read A0 BPM from it, I tried many codes related to virtual reading on LCD but no results and the configuration is not like what i really need, is there anyone who can help me with it, I have a WeMos D1 board (with esp8266) and I want to send the BPM values to my iPhone blynk app using lcd
Code of pulse using specific simple library:
#define heartPin A0
void setup() {
Serial.begin(115200);
}
void loop() {
int heartValue = analogRead(heartPin);
Serial.println(heartValue);
delay(1000);
}
Code for simple mode pushing (Blynk library):
#define BLYNK_PRINT Serial
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
BlynkTimer timer;
void sendSeconds() {
Blynk.virtualWrite(V0, millis() / 1000);
}
void sendMillis() {
Blynk.virtualWrite(V1, millis());
}
void setup()
{
// Debug console
Serial.begin(9600);
Blynk.begin(auth);
// Setup a function to be called every second
timer.setInterval(1000L, sendSeconds);
// Setup a function to be called every second
timer.setInterval(1000L, sendMillis);
}
void loop()
{
Blynk.run();
timer.run();
}