Skip to content

CircuitPython driver for the Person Sensor by Useful Sensors

License

Notifications You must be signed in to change notification settings

dupontgu/person-sensor-circuitpython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

person-sensor-circuitpython

CircuitPython driver for the Person Sensor by Useful Sensors.

Basic Usage

  1. Copy person_sensor.py into the lib folder on your CircuitPython device.

  2. From the (Adafruit CircuitPython library bundle)[https://circuitpython.org/libraries], copy adafruit_ticks.mpy into the lib folder on your CircuitPython device.

  3. In your code, initialize a busio.I2C instance (and make sure it's the one your Person Sensor is wired too!):

import busio
import board


# if your board has a stemma/qt connector
i2c = board.STEMMA_I2C()

# alternatively, if you're using the SDA/SCL pins:
# i2c = busio.I2C(board.SCL, board.SDA)
  1. Initialize a PersonSensor instance:
from person_sensor import PersonSensor

person_sensor = PersonSensor(i2c)
  1. Query the Person Sensor for detected faces:
while True:
    faces = person_sensor.get_faces()
    print(faces)

Resources

About

CircuitPython driver for the Person Sensor by Useful Sensors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages