const int AnalogIn = A0; // select the input pin for LDR int sensorIn = 0;// variable to store the value coming from the sensor void setup() { Serial.begin(9600);//sets serial port for communication } void loop() { sensorIn = analogRead(AnalogIn);// read the value from the sensor Serial.println(sensorIn);//prints the values coming from the sensor on the screen delay(100); }