Need help with Sonar sensor and IR trasmitter.

Hi guys, I am really new to Arduino, I have a basic understanding of the hardware and language. I am trying to make a device which sends an ir signal when the sonar picks up prolonged movement (10 Seconds) within 3 feet. Can anyone give me a push in the right direction? I have the hardware connected as follows. Arduino pro mini powered through micro usb, HC-SR04 VCC to 5v, GRND to GRND, Echo to pin 8, trigger to pin 9. The ir transmitter is set GRND to GRND, S to pin 6, R1 to pin 5.

Thank you

First you've got to figure out how your code is going to distinguish movement from a sequence of range measurements.
The target could move in a significantly long arc, and you'd never know it had moved.

j561gon:
Arduino pro mini powered through micro usb

Interesting. My Pro Minis don't have USB, like the original.

AWOL:
First you've got to figure out how your code is going to distinguish movement from a sequence of range measurements.
The target could move in a significantly long arc, and you'd never know it had moved.

I kinda understand what you are saying but, i would not know how to go about that.

Whandall:
Interesting. My Pro Minis don't have USB, like the original.

This is how I get them,

It's a mirror image, but that's a Nano

The image I linked is from the above products page.

This is a Nano (again from the products page)

Sorry, I thought it was the mini. if i were to break this up into parts. Like getting the sonar working first, what is the first thing I should do? The whole point of the project like I said before is when someone stands in the designated path of the sensor for 10 seconds it will send a signal to the ir transmitter to turn an object on or off.

Thanks again.

j561gon:
if i were to break this up into parts. Like getting the sonar working first, what is the first thing I should do?

If I were you, the first thing I'd do is download and install the "NewPing" library, then try out the example program(s). Then try modifiying the code slightly, to get your required 10 seconds before action is taken, and when you feel confident, move on to experimenting with the IR in a similar way.

What sort of "IR transmitter"? Do you mean that you will record the signal(s) from an IR remote control, then send those codes to the original device?