Help needed for an HC-SR04 ultrasonic sensor project

Hello everyone. Sorry for my English (i'm from Greece). I want to make a project with arduinouno board and a hc-sr04 ultrasoic sensor. The idea is: When an obstacle be in the sensor's range a led will be on (so far so good). I want this led to stay on for 3 seconds and after to be off for 8 seconds. This procedure (3sec. on/8sec. off) will running continusly till the obstacle be out from the sensor's range. Can someone help me? Thanks in advance George

Hi, If that is ALL you are doing, you can just use delay(3000); for example.

Maybe start with the ArduinoInfo.Info WIKI HERE: and the How-To information.

Thanks for your fast reply. I saw the site that you suggested. I have no problem with the first part of scetch. My problem is how to make the led to be on and off as the obstacle remain in the sensor's range and off when the obstacle be out of range. Any example?

Hi, Look at File>Examples>Digital>BlinkWithoutDelay on your regular Arduino IDE Software.