DHT11 Library for Arduino 1.0

2

Category : Arduino, Electronics

DHT11 is a cheap and easy to use temperature and humidity sensor. But since it’s digital and only uses one pin there is a great library for it!

Of course it has some problems compiling on Arduino 1.0 and the one I found on the arduino.cc playground had problems. So I modified it, and put both the library and the example in a nice and easy to unzip package. The example sends data on serial back to the pc, so it looks like this when posting results:

Credit goes to the arduino playground for the library and example code.

Download Arduino DHT11 Sensor Library

Ultrasonic HC-SR04 Sensor

Category : Arduino, Electronics

I’ve stumbled by this neat little sonar sensor on eBay a few days ago, I’ve had some bad experiences with other similiar ultrasonic sensors so I was kind of skeptic to this one. But for the low price I couldn’t resist. Anyhow, it turned out to be a great sensor. It’s accurate down to 1 cm, which is perfect and in most cases more than enough. You get it for around 5$ on eBay.

 

Only problem I ran into when using it with arduino was the library, got some nasty compiling errors. So I changed a few lines in the library and made it work with Arduino 1.0 and older arduino IDEs.

Download HC-SR04 Library for Arduino 1.0

Also wrote a little example for using it with a serial display: