OLED Displays with ...
 
Notifications
Clear all

OLED Displays with Arduino - I2C & SPI OLEDs  


DroneBot Workshop
(@dronebot-workshop)
Workshop Guru Admin
Joined: 2 years ago
Posts: 939
Topic starter  

OLED (Organic Light Emitting Diode) displays have a lot of advantages over LCD and traditional LED displays. Today we will learn how to use OLED displays with our Arduino projects. We’ll also build an OLED Temperature and Humidity Meter.

Article with code: https://dbot.ws/oled

OLED displays a bright, lightweight, and easy to read in almost any lighting condition. They come in all sizes, from huge wall-sized OLED televisions to thumbnail-sized status displays.

Today we will work with three small OLED displays:

- A 128x32 monochrome display that uses I2C
- A 128x64 dual-color display that also uses I2C
- A Waveshare 1.5 inch 128x128 monochrome display that can use either I2C or SPI

I’ll explain how an OLED differs from a regular LED and how it is ‘organic”. It doesn’t have anything to do with growing OLEDs without pesticides!

Next, we’ll look at some I2C OLEDs and experiment with them, using some excellent libraries from Adafruit.

After that, we will look at a very nice OLED display from Waveshare. It’s the largest display we’ll examine today and it can be used with either I2C or SPI. I will demo it in SPI mode using the demo code provided by Waveshare.

The example sketches provided with the libraries do a nice job of showing off the display's capabilities but they can be a little overwhelming to reverse-engineer for your own scripts. So to help I‘ve put together a very simple project to display simple text on the display, you can use it as the basis for your own Arduino OLED display projects.

The project is a temperature and humidity meter that uses the 128 x 64 dual-color OLED as a display. It uses an I2C temperature and humidity sensor so the wiring is super-easy. I'll go over the code for that in detail so you can see how it writes values to the OLED display.

Here is the Table of Contents for today's video:

00:00 - Introduction
02:20 - How OLEDs Work
06:19 - Look at OLED Displays
08:50 - OLEDs to Arduino with I2C
11:45 - Adafruit OLED Library
18:22 - I2C OLED Demos
24:27 - Waveshare OLED to Arduino with SPI
31:38 - OLED Temp & Humidity Meter

As always there is a detailed article on the DroneBot Workshop website that accompanies this video, you can find it at https://dbot.ws/oled. It covers everything in the video and you can also download the code for the temperature and humidity meter from the Resources box a the bottom of the article.

"Never trust a computer you can’t throw out a window." — Steve Wozniak


Quote