Author Topic: OAKdht Library  (Read 12758 times)


  • Newbie
  • *
  • Posts: 31
OAKdht Library
« on: July 25, 2016, 08:58:16 am »
This section has been empty too long.  Here is a simple DHT22 temperature and Humidity reading library with examples including Blynk smartphone example.  Hopefully I won't have to master GitHub to get this all posted.

Many Oak/Arduino newv users (myself included) take the simple and affordable DHT22 Temp and Humidity sensor as an early sensor to learn about their new Oak/Arduino's.  Some have been on this board struggling a bit.  I found the common Adafruit libraries too complicated for initial work and found a simpler library by Rob Tillaart.
My changes are minor -- adjusting timings for the Oak.  I have not tested with DHT11, but may still work with that sensor.

Another change was to name the .h and .cpp files with a distinctive name, OAKdht22.h and OAKdht22.cpp.  This should avoid some of the all too common Warning: multiple library files found the IDE spits out when you end up with several versions of a library in one of the various places they reside.  This may be my most important contribution to simplifying a first attempt at reading a sensor. 

I have a simple example that should run on the UNO, an example that writes to the Particle cloud and can be read using python (python file also included in and the Blynk example.  The latter writes well to the OAKTerm application as well as Blynk.  Screenshots attached.
Unzip the archive and add it to your libraries folder  (usually c:\Users\YOURNAME\Documents\Arduino\libraries).  Open or restart the arduino IDE and you can find the examples by using the
Files>Examples>Examples from custom libraries>Oakdht22 navigation in your IDE

Pick your favorite license -- all in the public domain as far as I am concerned.

« Last Edit: July 25, 2016, 12:52:52 pm by DrJFM »