/*
* Created by ArduinoGetStarted.com
*
* This example code is in the public domain
*
* Tutorial page: https://arduinogetstarted.com/tutorials/arduino-ldr-module
*/
#define AO_PIN A0 // Arduino's pin connected to AO pin of the ldr module
void setup() {
// initialize serial communication
Serial.begin(9600);
}
void loop() {
int lightValue = analogRead(AO_PIN);
Serial.println(lightValue);
}