Hi, I am using Node mcu esp8266, I am getting serial data on pin 3,4 of nodemcu, as C0.0D0V0.0DWh0.0DAh0.0D
C0.0D0V0.0DWh0.0DAh0.0D
it is coming from DC energy meter.
C stands for current
V=Voltage
Wh=watthour
Ah= Ampere hour.
I want to get all these data on Blynk app.
I have tried to get all these data on Blynk widget terminal but fail to do so please help.
COde:-
#define BLYNK_DEVICE_NAME "SOLAR POWER"
#define BLYNK_AUTH_TOKEN "ABC"
// Comment this out to disable prints and save space
#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <SoftwareSerial.h>
//#include<BlynkTimer.h>
SimpleTimer timer;
char auth[] = BLYNK_AUTH_TOKEN;
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "abc";
char pass[] = "ABC";
WidgetTerminal terminal(V9);
void setup() {
Serial.begin(9600);
Blynk.begin(auth, ssid, pass);
Serial.println("Booting");
terminal.println(F("------Solar-Power-------"));
terminal.flush();
timer.setInterval(100, Sent_serial);
}
void Sent_serial() {
// Sent serial data to Blynk terminal - Unlimited string readed
String content=""; //null string constant ( an empty string )
char character;
while(Serial.available())
{
character = Serial.read();
content.concat(character);
if (content != "")
Blynk.virtualWrite (V9, content);
delay(1000);
}
}
void loop() {
Blynk.run();
timer.run();
}```