Skip to main content

A simple library to use with the DockerPi SensorHub (EP-0106)

Project description

SensorHub

This is a simple library for use with the DockerPi/52Pi SensorHub (EP-0106). You may still need to set up the board as documented on the 52pi wiki (configuring/enabling I2C).

This library allows you to read from each sensor individually. It does not require the external temperature sensor to be connected, however an exception will be thrown if you try to read from it while it is disconnected.

How to use it

Interacting with the SensorHub is easy. First create an instance of the SensorHub, which will open communication with it:

from sensorhub.hub import SensorHub
hub = SensorHub()

Then it's just a case of calling the method for the value that you're after:

temperature = hub.get_temperature()

Other available methods are:

hub.get_off_board_temperature()
hub.get_humidity()
hub.get_temperature()
hub.is_motion_detected()
hub.get_brightness()
hub.get_barometer_temperature()
hub.get_barometer_pressure()

See the docstrings for more information on return types and exceptions that may be raised.

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

sensorhub-2.0.3.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sensorhub-2.0.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file sensorhub-2.0.3.tar.gz.

File metadata

  • Download URL: sensorhub-2.0.3.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for sensorhub-2.0.3.tar.gz
Algorithm Hash digest
SHA256 77495f533a194001a9fa4a240b39eca361d253cb3350ef737f700eec6486c65d
MD5 c8b2fa04fdb5ace16d4bc2c9afeffb63
BLAKE2b-256 f23de4134b2f539351cd2b2339bc47d41e65e984236f26af0261dfe1f101f9f1

See more details on using hashes here.

File details

Details for the file sensorhub-2.0.3-py3-none-any.whl.

File metadata

  • Download URL: sensorhub-2.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for sensorhub-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1c5e98c591580e68fbeb029a9ec2eaf8c8f3370d6edf6947f13fcb01d075b8c6
MD5 28465b90ebcf81a7624ea3bea76e01bd
BLAKE2b-256 0ea725bd28a53a712eff80f98b8622d58b9234355d86dc247fdb0d1a9bd06b4e

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