const int sensorPin = A0;
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
// put your setup code here, to run once:
}
void loop() {
int delayval = analogRead(sensorPin); // read the analog input
digitalWrite(LED_BUILTIN, HIGH); // set the LED on
delay(delayval); // delay is dependent on light level
digitalWrite(LED_BUILTIN, LOW); // set the LED off
delay(delayval);
// put your main code here, to run repeatedly:
}