I don't know if it's the circuit or the code that's not correct. Trying to get Temp & Humidity to display on the I2C-LCD. My serial Monitor shows the DHT22 is sending good data. I previously had this working, however, I accidentally deleted the sketch. I tried to recreate the sketch. Can't find it on YouTube.
Is there supposed to be a "wire" library or something?
here is the coding:
#include <LiquidCrystal_I2C.h>
#include <DHT.h> #include <DHT_U.h>
#define DHTPIN 2 #define DHTTYPE DHT22
DHT dht(DHTPIN,DHTTYPE);
LiquidCrystal_I2C lcd(0x27, 16, 2);
int br=9600;
int setUpDelay=3000;
int measDelay=5000;
float tempC;
float tempF;
float hum;
void setup() {
Serial.begin(br);
dht.begin();
delay(setUpDelay);
lcd.init();
lcd.backlight();
// put your setup code here, to run once:
}
void loop() {
tempC=dht.readTemperature(false);
tempF=dht.readTemperature(true);
hum=dht.readHumidity();
Serial.print("Temp: ");
Serial.print(tempC);
Serial.print(" Degrees C OR ");
Serial.print(tempF);
Serial.print(" Degrees F AND ");
Serial.print("Humidity is at: ");
Serial.print(hum);
Serial.println("%");
delay(measDelay);
}
This may help see wiring:

IDK for sure but I would very certainly take any bet that it does not.
The code goes through a standard Arduino too chain, and is run on a nearly perfect emulation of the microprocessor.
Doing anything that woukd damage the fidelity and therefore the usefulness of it as a simulator would be contrary to the wokwi philosophy.
One thing it isn't too good (or fussy) about is electronics. So LEDs can be bright with just the internal weak pull-up and won't burn out if you don't use a series current-limiting resistor.
Some parts don't need explicit wiring of Vcc and GND.
And all the LEDs are unsatisfactory for comparison to what things will look like IRL.
Your code works... so check your wiring... pin for pin... Verify every connection by removing all the wires and inserting the wires again. The length of the LCD wires might be too long for the I2C bus.
Add this line of code immediately after your last line of code. It will turn the built-in LED on the Uno ON then OFF on alternate reads of the DHT.
Success! Everything works fine now. Oddly (to me) the only thing I changed was eliminating the breadboard power supply. Powered the rails with the Uno only.
that's it. and it started working. Thanks!