Coder Social home page Coder Social logo

hxdaze / libsensors-python Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sensirion/libsensors-python

0.0 1.0 0.0 17 KB

DEPRECATED AND NO LONGER MAINTAINED. (Python library for accessing Sensirion RH/T and Flow sensors)

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

libsensors-python's Introduction

Simple Python Sensor Library

THIS REPOSITORY IS DEPRECATED AND NO LONGER MAINTAINED OR SUPPORTED

This is a small and simple library to collect data using Sensirion sensors with Python. Currently the following sensor chips are supported:

  • SHT3x (temperature and humidity)
  • SF04 (flow and differential pressure chip) used in the following products:
    • SDP6xx Series
    • SFM4xxx Series
    • SLx Series
    • Lx Series
    • LPG Series
  • SF05 (flow and differential pressure chip) used in the following products:
    • SFM3xxx Series

Library

The library functions are located in the file sensirion_sensors.py. The different functions and classes are documented in the source code.

Examples

The library comes with three examples that show different ways to use the library:

  1. sync_example.py

    Command line tool that reads all sensors synchronously with the same sampling frequency. The data can either be plotted to the console or stored in a file.

  2. async_example.py

    Command line script that reads every sensor asynchronously with an individual sampling frequency.

  3. streaming_example.py

    An example script that streams all sensor data to a local MQTT broker. The format of the MQTT payload is JSON, an example for an SHT sensor is included below. Timestamps are in seconds since 1970.

    {
        "timestamp": 1441799806.62,
        "values": [ 24.35, 53.21 ],
        "units": [ "°C", "%" ]
    }
    
  4. streaming_client.py and streaming_plot_client.py

    These scripts demonstrates how to connect to a remote broker and subscribe to sensor data. The streaming_client.py script simply prints all values to the console. The streaming_plot_client.py script opens up a window using Qt and shows live plots of all sensor values that are streamed.

Further Documentation

Current version of this library: https://github.com/Sensirion/libsensors-python

Paho mqtt library reference: http://www.eclipse.org/paho/clients/python/docs/

The Mosquitto MQTT broker: http://mosquitto.org/documentation/

Building the Kernel for Raspberry Pi: https://www.raspberrypi.org/documentation/linux/kernel/building.md

libsensors-python's People

Contributors

abrauchli avatar honggoff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.