const int LDRPin = A0; // LDR is connected to analog pin A0
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud rate
}
void loop() {
int sensorValue = analogRead(LDRPin); // Read the analog value from LDR
Serial.print("LDR Value: ");
Serial.println(sensorValue); // Print the LDR value to the serial monitor
delay(1000); // Wait for 1 second (1000 milliseconds) before reading again
}