HC-SR04 sensor plugin for circum.
Project description
circum-hc-sr04
HC-SR04 with Raspberry Pi sensor plugin for circum.
Install
Raspberry Pi
pip3 install circum-hc-sr04[rpi]
Other Linux Distributions
NOTE: This configuration is not tested or supported beyond installation.
First, install the libgpiod python bindings, this will vary by distribution. In Debian, Ubuntu, or derivatives use sudo apt install python3-libgpiod
.
pip3 install circum-hc-sr04[linux]
Usage
Usage: circum-endpoint hc-sr04 [OPTIONS]
Options:
--num-samples INTEGER The number of samples to average per reading.
--trigger-pin INTEGER The pin used to trigger the HC-SR04. [required]
--echo-pin INTEGER The pin the HC-SR04 will signal the echo on.
[required]
--speed-of-sound INTEGER Override the speed of sound to a calibrated value
in m/s.
--threshold INTEGER Only register an object if it is at least
threshold cm closer than the furthest distance
returned so far. This accounts for unmoving
objects in the sensors range at the cost of
missing moving objects that are present when the
sensor starts.
--help Show this message and exit.
To get more accurate readings, you can calibrate the sensor. Place an object a known distance from the sensor and pass the appropriate values to the calibration script. This will result in a value that can be passed to the endpoint sensor.
Usage: calibrate-hc-sr04 [OPTIONS]
Options:
--trigger-pin INTEGER The pin used to trigger the HC-SR04. [required]
--echo-pin INTEGER The pin the HC-SR04 will signal the echo on.
[required]
--samples INTEGER The number of samples to calibrate with.
--distance INTEGER The distance to the calibration object in cm.
[required]
--help Show this message and exit.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
circum-hc-sr04-0.0.3.tar.gz
(7.2 kB
view details)
File details
Details for the file circum-hc-sr04-0.0.3.tar.gz
.
File metadata
- Download URL: circum-hc-sr04-0.0.3.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dcbdf285c37d8f3b2399d4eba2926df0c01aa5deeffe6461f6bdb8e6565e794 |
|
MD5 | 0060f5b63710698a1588f184d46f7b7b |
|
BLAKE2b-256 | df0573cafd25a2ccdf4c2fdff7d83e15b6ad574bb4a9dfc8b04b5579fe8f9f3b |