Library to read hcsr501 sensor.
Project description
pi_hcsr501
Library for playing around with hcsr501 PIR motion sensor with Raspberry Pi.
Usage
from pi_hcsr501 import HcSr501
HCSR501 = HcSr501()
while True:
print(str(HCSR501.active) + " ", end="\r")
sleep(0.5)
Testing
Run unit tests with command:
cd pi_hcsr501
python3 -m unittest discover -s tst/
Get test coverage with commands:
cd pi_hcsr501
coverage run -m unittest discover -s tst/
coverage report -m
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pi_hcsr501-0.5.1.tar.gz
(1.5 kB
view details)
File details
Details for the file pi_hcsr501-0.5.1.tar.gz
.
File metadata
- Download URL: pi_hcsr501-0.5.1.tar.gz
- Upload date:
- Size: 1.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2a06cb54b610de1529bbb8e33ad972da213fc0ea861ff85879e4c5c029b5dca |
|
MD5 | 5953d0ae2128882dc94e93ccdbbec5b6 |
|
BLAKE2b-256 | ed97934114340f785c6af64cc63e2eafe6250683e7cfe9f821aebc16f88889d8 |