Coder Social home page Coder Social logo

arduino-sht75-sensor-and-modbus-tcp's Introduction

SHT1x Temperature / Humidity Sensor Library for Arduino

Copyright 2009 Jonathan Oxer [email protected] / http://www.practicalarduino.com
Copyright 2008 Maurice Ribble [email protected] / http://www.glacialwanderer.com

Provides a simple interface to the SHT1x series (SHT10, SHT11, SHT15) and SHT7x series (SHT71, SHT75) temperature / humidity sensors from Sensirion, http://www.sensirion.com. These sensors use a "2-wire" communications buss that is similar to I2C and can co-exist on the same physical wire as I2C devices.

Installation

Download the directory "SHT1x" and move it into the "libraries" directory inside your sketchbook directory, then restart the Arduino IDE. You will then see it listed under File->Examples->SHT1x.

Usage

The library is instantiated as an object with methods provided to read relative humidity and temperature. Include it in your sketch and then create an object, specifying the pins to use for communication with the sensor:

#include <SHT1x.h>
#define dataPin 10
#define clockPin 11
SHT1x sht1x(dataPin, clockPin);

You can then call methods on that object within your program. In this example we created an object called "sht1x", but it could have been called whatever you like. A complete example program is included with the library and can be accessed from the File->Examples->SHT1x menu.

readTemperatureC()

Returns a float within the valid range of the sensor of -40 to +123.8C. A value of -40 is returned in the event of a communication error with the sensor.

Example:

float tempC = sht1x.readTemperatureC();

readTemperatureF()

Returns a float within the valid range of the sensor of -40 to +254.9F. A value of -40 is returned in the event of a communication error with the sensor.

Example:

float tempF = sht1x.readTemperatureF();

readHumidity()

Returns a float within the valid range of the sensor of 0 to 100%. A negative value is returned in the event of a communication error with the sensor.

Example:

float humidity = sht1x.readHumidity();

arduino-sht75-sensor-and-modbus-tcp's People

Contributors

jonoxer avatar siamect avatar

Watchers

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