hcsr04sensor - Python Module

Donate Your donations keep this site ad free -- Thank You

Fork Star Issue Watch

HCSR04 Sensor

Contributing

The python hcsr04sensor module source code is available on Github.

End of Support for Python2 on January 1, 2020

Effective January 1 2020, hcsr04sensor will no longer be tested and supported on Python2. Install it with Python3 only going forward.
sudo pip uninstall hcsr04sensor
sudo pip3 install hcsr04sensor
It will most likely continue to work for some time anyway, but if any changes break when using Python2 it will not be fixed.

[an error occurred while processing this directive]

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.