#include <WiFi.h>
// Define the LDR pin
const int ldrPin = A0;
void setup() {
// Initialize serial communication
Serial.begin(115200);
// Connect to Wi-Fi (if required)
// Set the LDR pin as an input
pinMode(ldrPin, INPUT);
}
void loop() {
// Read the analog value from the LDR pin
int ldrValue = analogRead(ldrPin);
// Show the light intensity value
Serial.print("Light Intensity: ");
Serial.println(ldrValue);
// Delay for 1 second
delay(1000);
}