const int ldrPin = A0; // Pin connected to the LDR module analog output
void setup() {
Serial.begin(9600); // Start the Serial communication
pinMode(ldrPin, INPUT); // Initialize the LDR pin as an input
}
void loop() {
int ldrValue = analogRead(ldrPin); // Read the value from the LDR
Serial.println(ldrValue); // Print the value to the Serial Monitor
delay(500); // Wait for half a second
}