This project refers to an Arduino sketch that implements a motion detector using a passive infrared sensor (PIR), a piezo speaker, two switches for functions such as ON, OFF and an LED as function indicator. When the detector is in OFF state then it performs no real function (just turns off the function indicator), and when in ON state, then the program turns on the function indicator and checks whether there is motion (the detection range of the detector is about 6 feet) in the area (via the sensor PIR) to produce a tune with piezo speaker. This process is repeated continuously as long as there is movement and until the switch OFF is pressed.
Below is a picture of the project:
For more information you can get the project itself: