The SHT21 is a low cost humidity and temperature sensor. Its an I2C device so again is very simple to connect to any arduino
The SHT2x sensors contain a capacitive type humidity sensor, a band gap temperature sensor and specialized analog and digital integrated circuit – all on a single CMOSens® chip. This yields in an unmatched sensor performance in terms of accuracy and stability as well as minimal power consumption.
This is the breakout for the sensor that I bought.
Here is a simple schematic, again be careful as Vcc is 3.3v with this device
Schematic
Lets look at the required libraries and a basic code example, there is not much to this to be honest most of the work is done in the library
Code
There are a couple of libraries to help you out
https://github.com/misenso/SHT2x-Arduino-Library
https://github.com/elechouse/SHT21_Arduino
I used the latter one
[codesyntax lang=”cpp”]
#include <Wire.h> #include <SHT2x.h> void setup() { Wire.begin(); Serial.begin(9600); } void loop() { Serial.print("Humidity: "); Serial.println(SHT2x.GetHumidity()); Serial.print("Temperature(C): "); Serial.println(SHT2x.GetTemperature()); Serial.println(); delay(1000); }
[/codesyntax]
Links
these come in at about $7 for a useful breakout board with this sensor
Humidity Sensor – SHT21 Breakout Board