Sunday, October 23, 2016

How to build Humidity and temperature meter using DHT11 and OLED Display

Arduino Light Meter with photo resistor and OLED display

https://www.youtube.com/watch?v=g-rcEd_2I-w
This video show how to build a humidity meter using a DHT11 humidity sensor, I2C OLED display and Arduino Uno.

 A 128X64 I2C Oled ssd1306 display is used to display the humidity, temperature and heat Index.

I used an Arduino UNO 3.3V clone which uses Atmega328P. DHT11 humidity sensors are cheap and easily available on Ebay, Bangood, Sparkfun etc.

DHT22 humidity sensor can be used in place of DHT11 for more accuracy.

Library used U8Glib: Installed directly from the Library Manager in Arduino IDE.

Connect the humidity sensor pin 2 to D2 pin of Arduino. Also connect an 10K resistor between D2 and 3.3V pin of Arduino. The OLED display VCC is connected to 3.3V of Arduino. GND to GND of Arduino. SDA of OLED to SDA or Arduino, SCL of OLED to SCL of Arduino.

Humidity Meter code: Download/copy in the box below and save with .ino extension.
https://gist.github.com/embeddeduser/e7adc347397f1b3d1a9ae7e2598b4dc3

11 comments:

  1. Replies
    1. My program isn't compiled!he write Erreur status!Can u help me ?

      Delete
  2. what if i need the temp in Celsius to be displayed?

    ReplyDelete
    Replies
    1. y hawe to coment one lane u hawe instructions in code u just hawe to read a bit ...

      take a look on line 12


      // Display defaults to Degree F. TO use metric display,
      // comment out next line to display temperature in Degree C,
      #define METRIC

      Delete
  3. Works perfect - Is there a way to use nano instead? Thinking about SDA and SCL... Thanks!!

    ReplyDelete
  4. Hi the font is hard to read how would I increase its size, and maybe lose the heat index to make room for the larger text.

    ReplyDelete
  5. It proved to be Very helpful to me and I am sure to all the commentators here! Coupon Monkey

    ReplyDelete
  6. Is there a code for white color display thanks for anwser

    ReplyDelete