Enhanced Sensirion Library Available

I have posted to the Playground (link) an enhanced version of the Sensirion library for the SHT1x and SHT7x humidity/temperature sensors. My main interest was adding non-blocking methods to acquire measurements from the sensor due to the significant amount of time involved (up to 320 ms for temp and 80 ms for RH at default precision). The non-blocking calls allow a sketch to accomplish useful work while the sensor completes a measurement.

Additional changes include a method to select measurement precision, allowing public access to the dewpoint calculation, and inclusion of the latest formula coefficients from Sensirion for the humidity, temperature, and dewpoint calculations.

An example sketch is included with the library to demonstrate the non-blocking calls while flashing the pin 13 LED as a background task.

Hope this proves useful; I welcome feedback and would be happy to answer questions about the library.


I have tried all kinds of code on the internet in order to run my SHT1x but I always get temperatures like -40 (and they don't change even if I put my finger on top of the sensirion).

Now with SimpleSensirion I get 0 for temprature (and everything else) and when I unplug the 5V, I get once again -40.

Is this an indication that something goes wrong with the chip?

Sounds like communication failure with the sensor. It could be bad but first I'd look at how you have it connected. Which sensor are you using? Do you have the sensor's GND & 5V pins connected to the Arduino GND & 5V and a 10K ohm pullup resistor (to 5V) on the data signal? Also, how long are your wires?

Hi there

I could reliably reproduce this problem, with about 3ft or unshielded cable but all the right caps/pullups. Most recent Arduino (18?) and an SHT11.
Sensor works fine with SHT library. (But I do want to know the dewpoint.)

Thanks for your efforts, great work so far!


I have some strange problems with my sensirion SHT11 too. I downloaded the latest library from playground. While it does work the temperature that I get isn't correct. My AC says that it is 22 degrees C, my multimeter 23 or 22, old school thermometer says 22.5 but sensirion says 25. I cant figure out why this is happenning. Problem is that I don't trust this sensor. A year ago when I tested it it didn't work at all and then started working again. I discovered that one of the wires was broken so this could be the reason for it not working in the past. But that still doesn't explain why I am getting this results now.

Great job!

However, i also have problems to have it running with a long cable (something less than 1m). It even returns to me -40ºC, and 100% humidity...

For the moment i can not change this configuration, so, is there any way to solve it by code? May be increasing the longitude of the pulse through data and/or clock pins? How could i do it?

In the future i will reduce the wire in orde to have only 15-20 cm, but for the moment i need to have it running until to do the necessary changes on hardware.


ok, i don´t know why and how, now it runs... i didn´t make modifications on code or wiring... it seems that it need to be connected for some time until to obtain normal data... but it is only an idea, because i didn´t made changes...

Sensirion library news: I've posted version 2.0 of the library to the Sensirion wiki page that adds CRC checking, improved error detection / reporting, consistent handling of the internal pullup on the pin used for the serial data signal, plus other changes. See the README.txt file included with the library for details. (Direct link to the library: Sensrion_10Dec2010.zip)

I also updated the NonBlocking example code to demonstrate a way to use the CRC and error reporting features that should be useful in diagnosing communication issues with the sensor.


Thanks cjands40,

I will try it now, because some minutes ago i detected that my SH15 returns the same value since two days ago, in temperature and humidity… it was working perfectly in an outdoor device…

I will see if your new library could help to resolve the problem.

in any case, thank so much for your nive work!!