Jump to content

[Energia Library] DHT11 / DHT22 Temperature and Humidity Sensors

Recommended Posts



I made repository on github:



Here you can download modified version of DHT22/DHT11 library. This version based on topic starter code:




  • stable work - bug fix for timeouts in DHT22 support;
  • buffered support of data readings (ints and floats supported) - allows you read data faster, using internal buffer which holds saved data for tuned timeout;
  • wiring and tech documentation (included into repository).

dht22.ino based on DhtBuffered class which implements buffered support of int data. It reads data as integers and prints results with decimal part (using printDec()) call.


Also, you can found these examples:

  1. /examples/buffered_floats.ino - buffered reading of float results [8 443 bytes (of a 16 384 byte maximum) on MSP430G2553];
  2. /examples/buffered_ints.ino - buffered reading of integer results [4 221 bytes (of a 16 384 byte maximum) on MSP430G2553];
  3. /examples/unbuffered_floats.ino - unbuffered reading using original classes by MORA99 (using float results) [8 055 bytes (of a 16 384 byte maximum) on MSP430G2553].

Hope you like it. Enjoy!

Link to post
Share on other sites
  • 10 months later...

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.

  • Create New...