Skip to main content

Python base class to create infinite loop to work with sensors.

Project description

https://github.com/ricco386/RPi.Sensor/workflows/Test%20RPi.Sensor%20codebase/badge.svg https://github.com/ricco386/RPi.Sensor/workflows/Release%20RPi.Sensor%20to%20PyPI/badge.svg

Generic Python base class to create infinite loop to work with different sensors connected to Raspberry Pi. Project contains also extended Python base class with MQTT support.

RPi.Sensor library is stable in terms of running as a base class. Sensor logic and additional functionality before and after sensor measurement should be implemented in child objects anyway… But there are new features developed (and bug fixed as they are found) so it is recommended always use the latest version.

If you want to see example of implemented sensors, have a look at my other RPi repo.

Installation

  • Install the latest released version using pip:

    pip install https://github.com/ricco386/RPi.Sensor/zipball/master
  • Alternatively install latest released version from pypi:

    pip install --upgrade RPi.Sensor
  • Make sure all dependencies (listed below) are installed (done automatically when installing via pip)

Dependencies:

Usage

Inherit Sensor object or MqttSensor.

Main purpose of the sensor object is to run infinite loop for reading from the sensors. Object has build in basic functionality to terminate the infinite loop correctly (uppon CTRL+C or kill signal), basic logging etc.

Intention is to have ability to easily run some code before (or after) reading the sensor, this is is skeleton that doesnt do any logic and should be used only as a base for building the interactions with the sensors.

If you want to see example of implemented sensors, have a look at my other RPi repo.

If you find a security vulnerability please read through SECURITY.rst file and report it responsibly. All other issues and feature requests report via Github issue tracker.

License

For more information see the LICENSE file.

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

RPi.Sensor-0.5.3.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

RPi.Sensor-0.5.3-py3-none-any.whl (11.2 kB view hashes)

Uploaded Python 3

Supported by

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