Display lcd widgets same as real lcd


i am doing a project using sensor acs721 ,lcd i2c and node mcu

.The real LCD can display the current.But when i connect it to blynk, the lcd widget dont display any value.

i just want to display on widget the same things as real lcd display

do i need to add value display on blynk?

and im confuse when i need to use sketch of lcd advance or mode reading or mode pushing?

#include <Blynk.h>

#define BLYNK_PRINT Serial

#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

LiquidCrystal_I2C lcd(0x27,16,2);

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "";
char pass[] = "";

const int sensorIn = A0;
int mVperAmp = 185; // use 100 for 20A Module and 66 for 30A Module

double Voltage = 0;
double VRMS = 0;
double AmpsRMS = 0;

void setup()
  // Debug console

  Blynk.begin(auth, ssid, pass);

  lcd.print("current measure");



void loop()

 Voltage = getVPP();
 VRMS = (Voltage/2.0) *0.707; 
 AmpsRMS = (VRMS * 1000)/mVperAmp;

 Serial.println(" Amps RMS");
 lcd.println(" Amps RMS");;

float getVPP()
  float result;
  int readValue;             //value read from the sensor
  int maxValue = 0;          // store max value here
  int minValue = 1024;          // store min value here
   uint32_t start_time = millis();
   while((millis()-start_time) < 1000) //sample for 1 Sec
       readValue = analogRead(sensorIn);
       // see if you have a new maxValue
       if (readValue > maxValue) 
           /*record the maximum sensor value*/
           maxValue = readValue;
       if (readValue < minValue) 
           /*record the maximum sensor value*/
           minValue = readValue;
   // Subtract min from max
   result = ((maxValue - minValue) * 5.0)/1024.0;
   return result;


Yes you can use both LCD Widget and Physical LCD

No you do not need a Display Widget to use the LCD Widget

Advanced mode will work similar to how your physical LCD will work by choosing the line and starting character placement then printing the string.

Just set it up and call it something different than the physical lcd.print()… like vlcd.print(), etc.

Code formatting in the forum is with backticks, NOT commas, quotes, or apostrophes.



But it won’t work if you have the virtual LCD code in your void loop, you’ll flood the Blynk server. Read this:



yeah… i have same problem as mention in this article

but my coding need to use loop,

Voltage = getVPP();
VRMS = (Voltage/2.0) *0.707;
AmpsRMS = (VRMS * 1000)/mVperAmp;

and i dont think i can put it at void setup?


No… it does NOT. One rarely needs to read a sensor, and print to a display, hundreds or thousands of times a second.

Please read the article provided… setting up timed functions can work perfectly for your needs