OLED Temperature and Humidity Meter




I found this nice two color 128x64 pixel OLED display on eBay and thought it would make a perfect display for a simple temperature and humidity meter.

I've used Alex Chu's code from instructables How to use OLED display and DHT library for DHT-21 (AM2301) temperature and humidity sensor (this library can be used with other DHT sensors too).

I've added a BIG 32 pixel monospace font for the thermometer (only numbers and few other characters are implemented). Note that only the top part of the display is yellow and the bottom part is always blue, so you can't change color of any pixel.

Total cost of hardware for Arduino Nano, DHT temperature and humidity sensor and blue/yellow 128x64 OLED display is not much more than 10 dollars on eBay.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Connect the OLED Display and DHT21 Sensor to Arduino

Connect the OLED module to Arduino

OLED     Arduino
SDA      D9
SCL      D10
RST      D13
DC       D11
VCC      5V
GND      GND

Connect the DHT21 (AM2301) temperature and humidity sensor wires to Arduino

DHT21    Arduino
yellow   D5
red      5V
black    GND

Step 2: Upload the Code to Arduino

Upload the code to the Arduino.

Tools Contest

Participated in the
Tools Contest

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    3 Discussions


    4 years ago on Introduction

    Arduino: 1.6.3 (Windows 7), Board: "Arduino Uno"

    sketch_mar16a.ino: In function 'dht read_dht()':

    sketch_mar16a.ino:572:17: error: 'class dht' has no member named 'read21'

    sketch_mar16a.ino:576:10: error: 'DHTLIB_OK' was not declared in this scope

    sketch_mar16a.ino:579:10: error: 'DHTLIB_ERROR_CHECKSUM' was not declared in this scope

    sketch_mar16a.ino:582:10: error: 'DHTLIB_ERROR_TIMEOUT' was not declared in this scope

    Error compiling.

    This report would have more information with

    "Show verbose output during compilation"

    enabled in File > Preferences.


    4 years ago on Introduction

    This is great! I'd love to have more info on how you made this!