Jump to content
MORA99

[Energia Library] DHT11 / DHT22 Temperature and Humidity Sensors

Recommended Posts

Hello.

 

I made repository on github:

https://github.com/JFF-Bohdan/dht22

 

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

https://github.com/MORA99/Stokerbot/tree/master/Libraries/dht

 

Changes:

  • 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!

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

×