Giter VIP home page Giter VIP logo

bbsht1x's Introduction

bbSht1x

This module reads Humidity and Temperature from a Sensirion SHT1x sensor. It has been tested both with an SHT11 and an SHT15.

It is meant to be used in a BeagleBone (Black) and depends on this module (https://github.com/adafruit/adafruit-beaglebone-io-python).

The module Adafruit_BBIO.GPIO requires root privileges, therefore, to run this module you need to run your script as root.

This a modified Python/BeagleBone port of (https://bitbucket.org/lunobili/rpisht1x.git) which is port of this library: https://github.com/practicalarduino/SHT1x.

Example Usage::

from sht1x.Sht1x import Sht1x as SHT1x
dataPin = 11
clkPin = 7
sht1x = SHT1x(dataPin, clkPin)

temperature = sht1x.read_temperature_C()
humidity = sht1x.read_humidity()
dewPoint = sht1x.calculate_dew_point(temperature, humidity)

print("Temperature: {} Humidity: {} Dew Point: {}".format(temperature, humidity, dewPoint))    

Release Notes

  • v1.2, 31/12/2012 -- Added the possibility to define the GPIO mode (GPIO_BOARD or GPIO_BCM) in the constructor. This is to make sure that this library plays nicely with other libraries that might rely on a specific mode. If no mode is provided, the constructor will default to the GPIO_BOARD mode. Thanks to Daniël van Eeden for suggestiong this improvement.

  • v1.1, 26/10/2012 -- Added WaitingSht1x, dew point calculation and using v4 constants. WaitingSht1x makes sure that no more than a query per second is performed on the sensor. This is in order to prevent the sensor from heating and skewing the temperature readings.

  • v1.0, 7/10/2012 -- Initial release.

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.