using a PIR sensor to trigger lights

I'm working on an art installation project and I want to use the PIR sensor to activate some lights at a slow heart beat when you enter the room (say10m) when you get closer (at 6m) the beat picks up, a bit faster at 3m and then rapid at less than 1m. I have the sensor reading distance to the computer so it is working, I just can't get/write/find the program to activate the lighting. I saw a tutorial that refers to 'new ping' but can't find it.
My car sensors can do this why can't I?

If you post some more details we may be able to help you more.

What kind of sensor do you have? What kind of readings are you getting at the moment? Are you reading an analog voltage or getting some kind of digital readings?

What kind of lights are you controlling? Is it just a few LED’s or something more powerful? This will determine what kind of interface you need.

PIRs do not measure distance.

What sensors are you using?

The sensor I'm using is an HC-SR04 Ultrasonic range finder, it gives me digital distance readings on the computer.
The lights are red indoor LED strip 1 meter (model PHL-F3528R60-N-12) that is to be powered with a 12v adaptor. I can plug them into the breadboard with a 1meg OHM resistor along with a semi-conductor, well I think I can.
I saw a tutorial with the range finder and the LED light strip but the Arduino program was only for one distance, it was 'newPing' and I can't find it. So what I'm hoping for is some help with the program that will have the lights do different things with different distances.
Thanks.

Suggest you search the internet for the terms "arduino HC-SR04" for many good tutorials on the sensor.

http://howtomechatronics.com/tutorials/arduino/ultrasonic-sensor-hc-sr04/ is one..

All use the same pulseIn() function to measure distance using the ultrasonic sensor.

After you get the measurement side working you can easily do different things at different distances.

rw950431:
All use the same pulseIn() function to measure distance using the ultrasonic sensor.

Not necessarily. "NewPing" doesn't. It has some pretty good extra features that 'pulseIn()'-based ranging doesn't have, including timer-based ranging, multiple sensor support and 'ping_median()', which takes a series of readings, discards out of range values, then averages the rest. Also has built-in functions for conversion from round-trip microseconds to cm or inches.

The Arduino Playground page:- NewPing

The download/documentation page:- NewPing Library for Arduino

The "NewPing" thread:- NewPing Library: HC-SR04, SRF05, SRF06, DYP-ME007, Parallax PING))) - v1.7

A better thread title might have been "Using a HC-SR04 ultrasonic ranging sensor to trigger lights", instead of "using a PIR sensor to trigger lights".