Ultrasonic Distance Sensor
Use an HC-SR04 ultrasonic sensor to give your project the ability to calculate distance. This popular ultrasonic distance sensor provides stable and accurate distance measurements from 2cm to 450cm. It has a focus of less than 15 degrees and an accuracy of about 2mm.
Pyroelectric Infrared Motion Sensor
The HC-SR501 PIR Pyroelectric IR Infrared People Detector Module is used to detect the presence of motion. PIR sensors are commonly used to turn lights on and off automatically when people enter and leave a room. This Pyroelectric IR sensor has range of about 7 meters with a 120 degree cone angle. It can operate from 3.6-20V but we recommend powering it with 5V. There are adjustments for the detection range output delay.