hcsr04sensor - Python Module

Donate | PDF Manual

Fork Star Issue Watch

HCSR04 Sensor

Install hcsr04sensor

sudo apt install python3-pip python3-rpi.gpio
sudo pip3 install hcsr04sensor

Description

Use Python to calculate distance, depth and volume measurements with an HCSR04 Ultrasonic Sound Sensor and a Raspberry Pi. The module also works with a waterproof JSN-SR04T sensor.

The module does the following;

Connecting the Sensor

The HCSR04 sensor has four pins.