#include <WiFi.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 16, 2); // Initialize the LCD with I2C address 0x27 and 16x2 display
char ssid[] = "Wokwi-GUEST";
char pass[] = "";
void setup() {
Serial.begin(9600);
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("Connecting...");
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println("Connected to WiFi");
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("Success!");
lcd.setCursor(0, 1);
lcd.print("Connected wifi");
}
void loop() {
}