Components Required:
- Raspberry Pi 3 B+
- SD Card
- Micro USB Cable with Adapter
- Monitor with HDMI cable
- Mouse and Keyboard
- Breadboard
- 4 Jumpers
- 2 , 330ohm resistors
- Ultrasonic Distance Sensor (HY-SRF05)
Step 1: Connect Ultrasonic Sensor on Breadboard
Step 2: Connect Vcc and Gnd to Raspberry Pi
Step 3: Connect echo pin to GPIO17 through two 330ohm resistors
Step 4: Connect trigger pin to GPIO4
Step 5: Power up Raspberry Pi and program in python
The source code for the project can be found here.
Author: Nakul Garg