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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Create New...