Skip to main content

Package for motion sensor using sb412a-1

Project description

SB412A-1-Python

This package is used for human sensing with sb412a-1 on Rasberry Pi.

Installation

To install, just run following:

pip3 install sb412a_1

Usage

  1. Instantiate the Sb412a_1 class with the pin number as constructor parameter.
  2. Call the getData() method to get the data: 1 for detection, 0 for no detection.
from sb412a_1 import Sb412a_1
import time

SENSOR_PIN = 15
instance = Sb412a_1(SENSOR_PIN)

while True:
    print(instance.getData())
    time.sleep(1)

For working example, see example.py (you probably need to adjust pin for your configuration).

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

sb412a_1-0.0.2.zip (3.6 kB view details)

Uploaded Source

File details

Details for the file sb412a_1-0.0.2.zip.

File metadata

  • Download URL: sb412a_1-0.0.2.zip
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

File hashes

Hashes for sb412a_1-0.0.2.zip
Algorithm Hash digest
SHA256 08070b7a5e769c00b85507b4d1f294b28740170d1c285ee10090c8ced000732c
MD5 227ffb9e8bd02b4f0d2bf1f063211fe0
BLAKE2b-256 0d6515e3cc6e7606e143630b497aff4a6a5397601f4fb08770742a30fa4ca057

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page