Code for PIR sensor

http://skullbucks.in/projects/arduino/distancesensor.html