Hcsr04sensor

Latest version: v1.7

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

1.5.2

Allow use of BCM or BOARD values to identify GPIO pins. hcsr04sensor
uses BCM values by default, but allows the user to override with BOARD
values if they wish.

1.5.1

Added a script called hcsr04.py that allows testing the library.

run 'hcsr04.py --help' to see options.

1.5.0

Add error handling around failed echo return pulses which could indicate
a sensor or cable problem. Will allow applications that use the module
to raise an exception and have better error reporting rather than having
their app hang indefinitely with 100% CPU spike.

1.4.0

Allow changing the default sample_wait from 0.1 seconds to a faster
interval. This is the speed of the individual samples in sample_size.

1.3.0

Add default values for unit, temperature and round_to in sensor.py
hcsr04sensor uses metric temperature by default.
Most use cases don't need to specify this and just causes extra typing
for nothing. But option is there to pass the imperial temperature if you like.

Rounding beyond 1 decimal is pointless as readings on a multi tasking OS will
not be Real Time and will have variance within 1 cm.
But if you need to you can specify round_to to be greater
than 1

See the provided example scripts for usage.

1.2.0

Python 3 compatibility

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.