int sensorPin = A0; // input pin for the LDR
int sensorValue = 0; // variable to store the value coming from the sensor
int led = 3; // output pin for LED

void setup() {
pinMode(led, OUTPUT);
Serial.begin(9600); }

void loop() {
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if (sensorValue < 100){
digitalWrite(led,HIGH);
delay(500);
}
else {
digitalWrite(led,LOW);
delay(500);
}
}