Skip to main content

HC-SR04 sensor plugin for circum.

Project description

circum-hc-sr04

build PyPI

HC-SR04 sensor plugin for circum.

NOTE: this package installs, but it has not been tested with hardware.

Install

pip3 install circum-hc-sr04

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.

Files for circum-hc-sr04, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size circum-hc-sr04-0.0.2.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page