Arduino uno + esp-01 connected to blynk + LCD not working

I used 4 sensor with arduino uno and also connected it to blynk, i also want to display the output in LCD but when i upload the lcd code the its not running, but without the lcd code its running in blynk. what should i do ?

this my code without LCD (the none running in blynk)

#define BLYNK_PRINT Serial

#define BLYNK_TEMPLATE_ID ""
#define BLYNK_TEMPLATE_NAME ""
#define BLYNK_AUTH_TOKEN ""


#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

// Your WiFi credentials.
// Set password to "" for open networks.
const char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "";
char pass[] = "";

#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3);  // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
OneWire oneWire(4);                   // Pin 2 is used for the OneWire interface
DallasTemperature sensors(&oneWire);  // Pass the OneWire reference to DallasTemperature library

ESP8266 wifi(&EspSerial);
float calibration_value = 22.85;
int phval = 0;
unsigned long int avgval;
int buffer_arr[10], temp;
int temperature;
int turb ;
float ph ;
int tds ;
const int tdsPin = A1;  // Analog input pin for TDS sensor

BlynkTimer timer;

void setup() {
  // Debug console
  Serial.begin(9600);
  delay(10);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);
  
  Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass);
    timer.setInterval(1000L, getSendData);
}

void loop() {
  Blynk.run();
    timer.run();

}

void getSendData(){
  // Temperature
  sensors.requestTemperatures();                   // Request temperature readings from the sensor
  float temperature = sensors.getTempCByIndex(0);  // Get the temperature in Celsius

  // Turbidity
  int turbidity = analogRead(A2);
  float turb = turbidity * (5.0 / 1024.0) * 3;

  // pH
  for (int i = 0; i < 10; i++) {
    buffer_arr[i] = analogRead(A0);
  }
  for (int i = 0; i < 9; i++) {
    for (int j = i + 1; j < 10; j++) {
      if (buffer_arr[i] > buffer_arr[j]) {
        temp = buffer_arr[i];
        buffer_arr[i] = buffer_arr[j];
        buffer_arr[j] = temp;
      }
    }
  }
  avgval = 0;
  for (int i = 2; i < 8; i++) {
    avgval += buffer_arr[i];
  }
  float volt = (float)avgval * 5.0 / 1024 / 6;
  ph = -5.70 * volt + calibration_value;

  int tdsValue = analogRead(tdsPin);
  float voltage2 = tdsValue * (5.0 / 1024.0);
  float tds = voltage2 * 1000;  // Convert to TDS value (adjust the conversion factor as per your sensor)


Serial.print("temp: ");
Serial.println(temperature);

Serial.print("turb: ");
Serial.println(turb);

Serial.print("ph: ");
Serial.println(ph);

Serial.print("tds: ");
Serial.println(tds);

Blynk.virtualWrite(V0, temperature);
Blynk.virtualWrite(V1, turb);
Blynk.virtualWrite(V2, ph);
Blynk.virtualWrite(V3, tds);


}

and this is with lcd (not running or display in lcd )

#define BLYNK_PRINT Serial

#define BLYNK_TEMPLATE_ID ""
#define BLYNK_TEMPLATE_NAME ""
#define BLYNK_AUTH_TOKEN ""


#include <OneWire.h>
#include <DallasTemperature.h>
#include <Wire.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <LiquidCrystal_I2C.h>


// Your WiFi credentials.
// Set password to "" for open networks.
const char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "";
char pass[] = "";

#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3);  // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
OneWire oneWire(4);                   // Pin 2 is used for the OneWire interface
DallasTemperature sensors(&oneWire);  // Pass the OneWire reference to DallasTemperature library
LiquidCrystal_I2C lcd(0x27, 20, 4);   // I2C address may vary, adjust as necessary

ESP8266 wifi(&EspSerial);
float calibration_value = 22.85;
int phval = 0;
unsigned long int avgval;
int buffer_arr[10], temp;
int temperature;
int turb ;
float ph ;
int tds ;
const int tdsPin = A1;  // Analog input pin for TDS sensor

BlynkTimer timer;

void setup() {
  // Debug console
  Serial.begin(9600);
  delay(10);

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);
  
  Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass);
    timer.setInterval(1000L, getSendData);
      Lcd();

}


void Lcd() {
  lcd.init();       // Initialize the LCD
  lcd.backlight();  // Turn on the backlight
}

void loop() {
  Blynk.run();
    timer.run();

}

void getSendData(){
  // Temperature
  sensors.requestTemperatures();                   // Request temperature readings from the sensor
  float temperature = sensors.getTempCByIndex(0);  // Get the temperature in Celsius

  // Turbidity
  int turbidity = analogRead(A2);
  float turb = turbidity * (5.0 / 1024.0) * 3;

  // pH
  for (int i = 0; i < 10; i++) {
    buffer_arr[i] = analogRead(A0);
  }
  for (int i = 0; i < 9; i++) {
    for (int j = i + 1; j < 10; j++) {
      if (buffer_arr[i] > buffer_arr[j]) {
        temp = buffer_arr[i];
        buffer_arr[i] = buffer_arr[j];
        buffer_arr[j] = temp;
      }
    }
  }
  avgval = 0;
  for (int i = 2; i < 8; i++) {
    avgval += buffer_arr[i];
  }
  float volt = (float)avgval * 5.0 / 1024 / 6;
  ph = -5.70 * volt + calibration_value;

  int tdsValue = analogRead(tdsPin);
  float voltage2 = tdsValue * (5.0 / 1024.0);
  float tds = voltage2 * 1000;  // Convert to TDS value (adjust the conversion factor as per your sensor)


  lcd.setCursor(0, 0);
  lcd.print("checking ");


Serial.print("temp: ");
Serial.println(temperature);

Serial.print("turb: ");
Serial.println(turb);

Serial.print("ph: ");
Serial.println(ph);

Serial.print("tds: ");
Serial.println(tds);

Blynk.virtualWrite(V0, temperature);
Blynk.virtualWrite(V1, turb);
Blynk.virtualWrite(V2, ph);
Blynk.virtualWrite(V3, tds);


}

What exactly does this mean?
What do you see in your serial monitor with the LCD code?

What is the source of your LCD library, and what version of that library are you using?

Pete.

when i upload the code with lcd the theres no output with the sensor, also dont have display in the lcd and in serial monitor

only this

[1734] Connecting to Pro
[4922] AT version:0.50.0.0(Sep 18 2015 20:55:38)
SDK version:1.4.0
compile time:Sep 18 2015 21:32:07
OK
[14177] +CIFSR:STAIP,"192.168.129.27"
+CIFSR:STAMAC,"a8:48:fa:c1:c7:a9"
[14187] Connected to WiFi
[24610] Ready (ping: 25ms).
[60488] Ready (ping: 34ms).

also in the blynk its just getting online after few second in will offline. again and again

can you give me the right lcd liblary that compatible to esp-01 ?

How are you powering the LCD display? The backlight consumes quite a bit of power, and it sounds like you might be starving the ESP-01 of power.

Pete.

through uno

so ill try to seperate the supply of lcd ?

Yes, but they need to share a common ground.

Pete.

its like this ?

Not using a 9v battery.

Pete.

about my code theres something wrong ?

I don’t know, because you didn’t answer my question about which library you’re using.

Pete.

i figure it out, its the ds18b20 temperature sensor this is my code

#define BLYNK_PRINT Serial

#define BLYNK_TEMPLATE_ID ""
#define BLYNK_TEMPLATE_NAME ""
#define BLYNK_AUTH_TOKEN ""

#include <OneWire.h>
#include <DallasTemperature.h>
#include<LiquidCrystal.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <Wire.h>
//#include <LiquidCrystal_I2C.h>



// Your WiFi credentials.
// Set password to "" for open networks.
const char auth[] = BLYNK_AUTH_TOKEN;

char ssid[] = "";
char pass[] = "";


#include <SoftwareSerial.h>
SoftwareSerial EspSerial(2, 3);  // RX, TX

// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
#define ONE_WIRE_BUS 8
ESP8266 wifi(&EspSerial);

LiquidCrystal lcd(12,11,5,4,7,6);
OneWire oneWire(ONE_WIRE_BUS);                   // Pin 2 is used for the OneWire interface
DallasTemperature sensors(&oneWire);  // Pass the OneWire reference to DallasTemperature library

BlynkTimer timer;
void setup() {
Serial.begin(9600);
  delay(10);
      Lcd();

  // Set ESP8266 baud rate
  EspSerial.begin(ESP8266_BAUD);
  delay(10);
  
  //Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass);
  Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass, "blynk.cloud", 80);

    timer.setInterval(1000L, getSendData);
}

void Lcd() {
 // lcd.begin(16,2);
  lcd.begin(0,2);
    sensors.begin();

}

void loop() {
  Blynk.run();
    timer.run();
}

void getSendData(){
// Temperature
  sensors.requestTemperatures();                   // Request temperature readings from the sensor
  float temperature = sensors.getTempCByIndex(0);  // Get the temperature in Celsius

  lcd.setCursor(7, 1);
  lcd.print(temperature);
  Blynk.virtualWrite(V4, temperature);


}

i dont have idea why its not working. the blynk just get online and after few second its offline.

I’m totally lost now. You’ve said…

But then …

So what is it that you’ve figured-out?

You seem to be using a different LCD library, but still haven’t said which one, and which version you are using.

It’s difficult to help if you don’t want to answer questions or provide clear information.

Pete.

Im using lcd without l2C, and the other sensor is working in lcd and blynk just only the ds18b20 temperature is the one not working.

im using LiquidCrystal by arduino, adafruit

That seems unlikely, as the Adafruit Liquid Crystal library requires the use of #include "Adafruit_LiquidCrystal.h"

So either you’ve renamed and edited the .h and .cpp files or you’re using something different.

I’ve asked a couple of times for information about which version (release number) of the LCD library you’re using, but each time you ignore that request.

Do you want help with this issue?

Pete.

sorry for that, i already try but its still like that

I’m sorry, I don’t understand.

Pete.