Coder Social home page Coder Social logo

wilx / temperhum Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cjmair/temperhum

0.0 1.0 0.0 29 KB

Python 3 program to read temperature and humidity from a TEMPerHUM USB sensor on a Raspberry Pi

License: GNU General Public License v3.0

Python 93.40% Shell 6.60%

temperhum's Introduction

temperhum.py

Python 3 program to read temperature and humidity from a TEMPerHUM USB sensor on a Raspberry Pi

Installation

In a Raspberry Pi, terminal or ssh session, run the following commands, you can ignore the first one, if you already have git installed.

  sudo apt-get install git
  git clone https://github.com/cjmair/temperhum.git
  cd temperhum
  ./install.sh

Usage

At a command prompt enter

  temperhum.py

This should return the temperature, in Celsius and the humidity, in the format below

  23.9C 38%

Optoins

Various options can be given on the command line, see the --help option listing below

  temperhum.py --help

  Usage: temperhum.py [OPTION]
  Reads the temperature and humidity from a PCSensor, TEMPerHum, USB sensor, USB ID 413d:2107

  --help          shows this :-)
  --version       displays version information and exits
  --f             output temperature in Fahrenheit, default is Celsius
  --nosymbols     do not show C, F or %
  --raw           include the raw data from the sensor in the output, as hex bytes
  --debug         turn on debugging output
  --reattach      if the usb device is attached to a kernel driver, default is to detach it,
                  and leave it that way, this option forces a reattach to the kernel driver on exit

for example

  temperhum.py --f --nosymbols

will return the temperature in Fahrenheit and the humidity, without any symbols, as below

  75.2 38

temperhum's People

Contributors

cjmair avatar wilx 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.