LCD help for my project

Hi Blynkers,

I never used the LCD display, and I’m trying to understand how, I wonder, have a ready code and tried to mix my code with my Blynk credentials, then I ask, I can read on the LCD display Blynk the same information which is shown in my real display? If yes, what is the way to do this?I should use an I2C display necessarily? If anyone can explain I will be grateful, thank your in advanced.

My code below.

#define BLYNK_PRINT Serial
#include <SPI.h>
#include <Ethernet.h>
#include <BlynkSimpleEthernet.h>
#include <LiquidCrystal.h>
byte b = 8;
byte led1 = 9;
byte led2 = 10;

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

char auth[] = “--------”;

void setup()
{
Serial.begin(9600); // See the connection status in Serial Monitor
Blynk.begin(auth); // Here your Arduino connects to the Blynk Cloud.
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(b, INPUT);
lcd.begin(16,2);
lcd.setCursor (2,0);
lcd.print (“ESTADO BOMBAS”);
lcd.setCursor (3,1);
lcd.print ("BOIA DESLIG. “);
lcd.print (” ");
}

void loop(){
static boolean lastValue = false;
static unsigned long lastDebounceTime = 0;
static byte lastButtonState = LOW;

static byte iLed = 0;
byte r = digitalRead(b);

if (r != lastButtonState) { lastDebounceTime = millis(); }

if ((millis() - lastDebounceTime) > 80) { //80ms time debouncing

if (r && r != lastValue){    //borda de subida
  lastValue = true;

  iLed++;
  if (iLed > 1) {iLed = 0;}

  if (iLed == 0){
    digitalWrite(led1, HIGH);
    lcd.setCursor (2,1);
    lcd.print ("BOMBA.2 LIGADA    ");
    lcd.print ("                  ");
  } else {
    digitalWrite(led2, HIGH);
    lcd.setCursor (2,1);
    lcd.print ("BOMBA.1 LIGADA    ");
    lcd.print ("                  ");
  }

}

if (!r && r != lastValue){    //borda de descida
  lastValue = false;

  if (iLed == 0){
    digitalWrite(led1, LOW);
    lcd.print ("          ");
    lcd.setCursor (2,1);
    lcd.print ("BOIA DESLIG.");
    lcd.print ("            ");
  } else {
    digitalWrite(led2, LOW);
    lcd.print ("          ");
    lcd.setCursor (2,1);
    lcd.print ("BOIA DESLIG.");
    lcd.print ("            ");
  }
}

}
lastButtonState = r;

delay(20);

Blynk.run(); // All the Blynk Magic happens here…
}

Greetings

CKPreformatted text