if statement and ldr

hi first post :)

basis of code : --- PUT HTTP AT FRONT> arduino.cc/en/Tutorial/IfStatement

what I want to do with the code:

right now I got a ldr which when the threshold goes above 400 it will add +1 to a counter

I need this counter to go up to 5 but not so quickly, I want to add a delay so that the light dependent resistor will only check every 1 second if threshold of ldr is above 400 instead of being instantanious

thx in advance :)

delay(1000) between each check of the LDR?

Or, look at the Blink Without Delay example of how to use millis to check when it’s time to take another reading, so the Arduino can keep working between readings.

Basically implement what is in this diagram:-