Jump to content
Sign in to follow this  

[Energia Library] LadyAda's DHT Library Ported

Recommended Posts

Ooops... sorry sorry Rei Vilo, my mistake.

Yes I found your DHT22 lib implementation better.

However I will ship both DHT11 or DHT22 with my kits and the ladyada lib was working with both sensors on both Arduino and Energia so I kept this one.

Once the main code will be working ok I will perhaps change the library...



Share this post

Link to post
Share on other sites



sorry I'm using Stellaris Launchpad LM4F120XL and I'm trying to connect it with DHT11.

For connection I use DHTPIN PB_7. Code that I'm running is copied from AdaDHT11.zip from the first post.



problem was that I removed all "case:" from DHT.cpp


Now I think I have problem with conversion between data types.

Is it correct to use this function in void loop:

float h=dht.readHumidity()
float t=dht.readTemperature()
if (isnan(t) || isnan(h)){
else {
sprintf(buffer,"%f",h);      //   <- is it correct?

On screen I receive string "OK" but for LCDString(buffer) i got nothing. buffer is "char buffer[6];"


PS: Now between pin 1  VCC & pin 2 DATA of the DHT11 I'm using resistor 4,8kOhms instead of 10kOhms.

PS2: I included only DHT.h from first post & LCD_5110.h  (by Rei VILO)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this