I am not sure where but i think i made an error in the way i wrote my code. I am trying to have the led blink when the photo resistor reads a low value and when it reads a high value i was it to stay on solid. Here is the code that i have writen any help would be welcomed.
int sensePin =0;
int ledPin = 9;
void setup(){
analogReference(DEFAULT); //isn't nessary
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
void loop() {
int val = analogRead(sensePin);
if(val < 25)digitalWrite(ledPin, LOW);
delay(700);
digitalWrite(ledPin, HIGH);
delay(700);
else digitalWrite(ledPin, HIGH);
Serial.println(analogRead(sensePin));
delay(500);
}