My LCD and Blynk cant ran together

1.Wired :

LCD I2C ----------------------
SCL : D 22
SDA : D 21
Vcc : 5V 1st time i try using VIN in Dec Kit its failed, 2nd time i try using adaptor 5V and still fail i mean no word in it.
GND: 1st im using Dev kit Gnd, 2nd using adaptor Gnd.

DHT22--------
Vcc : 3,3V
GND : Dev Kit Gnd
Data : D 4

2.I had try just monitoring DHT22 + LCD I2C and its work.

Code :

#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <DHT.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
#define DHTPIN 4          // What digital pin we're connected to
#define DHTTYPE DHT22   // DHT 22, AM2302, AM2321
DHT dht(DHTPIN, DHTTYPE);

void setup() {  
  Serial.begin(9600);
  dht.begin();
  lcd.begin();

}

void loop(){
  float h = dht.readHumidity();
  float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit
  
  lcd.setCursor(0, 0); 
  lcd.print("H : ");
  lcd.print(h);
  lcd.print("%");
  
  lcd.setCursor(0, 1);
  lcd.print("T : ");
  lcd.print(t);
  lcd.print("C");
}

3.The sketch i reply, it doesnt display data in Blynk, but its stable in connection.

Hei sir. Im back with good news, I have a sketch that work properly, but i still need your advice to make it perfect.

Wired :
LCD I2C
SCL : D 22
SDA : D 21
Vcc : Vin (5V)
GND: Dev kit Gnd

DHT22
Vcc : 3,3V
GND : Dev Kit Gnd
Data : D 4

#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#define BLYNK_PRINT Serial
#define BLYNK_AUTH_TOKEN            "--------------------------"
#define BLYNK_TEMPLATE_ID           "----------------------------"
#define BLYNK_DEVICE_NAME           "---------------------------"
#include <BlynkSimpleEsp32.h>
#include <WiFi.h>
#include <WiFiClient.h>
#include <DHT.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);
DHT dht(4, DHT22);
BlynkTimer timer;
char ssid[] = "------------";// Your WiFi credentials.
char pass[] = "-----------";// Set password to "" for open networks.

void sendSensor()
{
  float h = dht.readHumidity();
  float t = dht.readTemperature(); // or dht.readTemperature(true) for Fahrenheit
  
  if (isnan(h) || isnan(t)) {
    Serial.println("Failed to read from DHT sensor!");
    return;
  }

  Blynk.virtualWrite(V5, h);
  Blynk.virtualWrite(V6, t);

  lcd.setCursor(0, 0); 
  lcd.print("H : ");
  lcd.print(h);
  lcd.print("%");
  
  lcd.setCursor(0, 1);
  lcd.print("T : ");
  lcd.print(t);
  lcd.print("C");
}

void setup()
{
  Serial.begin(115200);
  lcd.begin();
  lcd.backlight();
  Blynk.begin(BLYNK_AUTH_TOKEN, ssid, pass);
  dht.begin();
  timer.setInterval(10L, sendSensor);
}

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

What i see by change the sketch over time, the issue maybe in the sequence of sketch. i dont know if its true or not may you can give me explanation ? :bowing_man:

Must be at the top of your sketch. The first lines.

You’re calling the sendsensor() function 100 times per second. I’d suggest that you increase the timer to 1000L (1 second) instead.

I have try move it to first lines but its end up my lcd dont show data, but i have edit calling the sendsensor() function to 1000L. I think i keep the LCD lib be 1st line

Exactly which LCD library are you using, and what version of tgat library are you using?

Pete.

Im using Arduino-LiquidCrystal-I2C-library-master

Does that answer my questions?

Pete.

I had look in output of compile, #include <LiquidCrystal_I2C.h> this lib using Arduino-LiquidCrystal-I2C-library-master

My bad LCD Im using this :

I still have no idea which version of the Adafruit LCD library you are using.

Pete.

I will mark the version :

I still have no idea which library/version you are using.

I don’t need screenshots, just a URL to the library’s GitHub page and the words “I’m using version xx.xx”

Pete.

Im installed LCD library by Library Manager using Version [1.0.7] but you can download from LiquidCrystal - Arduino Reference

URL?

Pete.

Here : https://downloads.arduino.cc/libraries/github.com/arduino-libraries/LiquidCrystal-1.0.7.zip?_gl=1otojxl_gaMTkzMjgyMTkxNy4xNjc1NTAwMTM1_ga_NEXN8H46L5*MTY3NjI4OTM4My4xNC4wLjE2NzYyODkzODMuMC4wLjA.

So I’m confused about where the Adafruit library you mentioned earlier fits-in to the equation.

When you compile the code and it lists the libraries used, does it mention the Adafruit library, and does it say that version 1.0.7 of this library was used?

Pete.

Yes it does,

output say

Alternatives for Adafruit_Sensor.h: [Adafruit Unified Sensor@1.1.7]
ResolveLibrary(Adafruit_Sensor.h)
  -> candidates: [Adafruit Unified Sensor@1.1.7]

Sir. Can u teach me this, may u have link for this.

I need to see more of that message for it to be meaningful, and at the end of the compilation - before the upload - it should list the libraries used. I’d like you to copy that in full.

Do mean that you’re currently nit using a separate power supply for the LCD?
If that’s the case you may already have damaged your ESP32.

Pete.

im upload it to google docs, cuz in here max 32000 word.

I mean in next project i need more source, i want to use Relay 2 channel 5V, DHT 22 5V, LCD I2C 5V, Vout total need 15V so i will need more power.