Skip to content

Commit 72bd7e7

Browse files
committed
Expanded README
1 parent 6d69b98 commit 72bd7e7

File tree

1 file changed

+42
-4
lines changed

1 file changed

+42
-4
lines changed

README.markdown

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,47 @@
1-
SHT1x
2-
=====
1+
SHT1x Temperature / Humidity Sensor Library for Arduino
2+
=======================================================
3+
Copyright 2009 Jonathan Oxer <jon@oxer.com.au> / <www.practicalarduino.com>
4+
Copyright 2008 Maurice Ribble <ribblem@yahoo.com> / <www.glacialwanderer.com>
5+
36
Provides a simple interface to the SHT1x series (SHT10, SHT11, SHT15)
47
temperature / humidity sensors from Sensirion (www.sensirion.com).
58
These sensors use a "2-wire" communications buss that is similar to I2C
69
and can co-exist on the same physical wire as I2C devices.
710

8-
Copyright 2009 Jonathan Oxer <jon@oxer.com.au> / <www.practicalarduino.com>
9-
Copyright 2008 Maurice Ribble <ribblem@yahoo.com> / <www.glacialwanderer.com>
11+
Installation
12+
------------
13+
Download the directory "SHT1x" and move it into the "libraries"
14+
directory inside your sketchbook directory, then restart the Arduino
15+
IDE. You will then see it listed under File->Examples->SHT1x.
16+
17+
Usage
18+
-----
19+
The library is instantiated as an object with methods provided to read
20+
relative humidity and temperature. Include it in your sketch and then
21+
create an object, specifying the pins to use for communication with the
22+
sensor:
23+
24+
#include <SHT1x.h>
25+
#define dataPin 10
26+
#define clockPin 11
27+
SHT1x sht1x(dataPin, clockPin);
28+
29+
You can then call methods on that object within your program. In this
30+
example we created an object called "sht1x", but it could have been
31+
called whatever you like. A complete example program is included with
32+
the library and can be accessed from the File->Examples->SHT1x menu.
33+
34+
### float sht1x.readTemperatureC() ###
35+
Returns a float within the valid range of the sensor of -40 to +123.8.
36+
A value of -40 is returned in the event of a communications error with
37+
the module.
38+
39+
### float sht1x.readTemperatureF() ###
40+
Returns a float within the valid range of the sensor of -40 to +254.9C.
41+
A value of -40 is returned in the event of a communications error with
42+
the module.
43+
44+
### float sht1x.readHumidity() ###
45+
Returns a float within the valid range of the sensor of 0 to 100%.
46+
A value of -4.4 is returned in the event of a communication error with
47+
the module.

0 commit comments

Comments
 (0)