This is the fifth video of the Raspberry Pi GPIO Programming with Python Tutorial. In this video, we'll see how to use the HC-SR04 ultrasonic distance sensor with the Raspberry Pi to measure the proximity of objects to the ultrasonic sensor.
We'll see the circuit setup and then give two examples in Python. Both of them will be showing the distance to the object and the second example will include a buzzer in order to create a kind of parking sensor effect.
For detailed information about gpiozero interface you can go and check the website (the first piece of code is directly taken from the gpiozero documentation):
[ Ссылка ]
![](https://s2.save4k.ru/pic/ilbSR3k-7XE/maxresdefault.jpg)