Do something only if the sensor is low for more than 1 second

polymorph:
Check out the sketches "Blink without delay" and "Debounce". And stop using delay(), it isn't scalable.

If I were evil and wanted to make as many beginners as possible give up in frustration, having everyone start with the Blink sketch using delay() would likely be my first choice.

thanks dude i was just staring to use denounce() for my 1 second delay, delay() really did not seem to be a simple solution