Arduino OLED – Tutorial and Project Ideas
OLEDs is a flat light emitting technology which do not require a back light which makes it more efficient and slimmer than LCD Displays. In today Arduino OLED tutorial, we will be covering:
- Seeed OLED Displays
- When do you use an OLED display
- How to Connect your Arduino to an OLED display in just 5 steps!
- Project ideas for your OLED display with the Arduino
Seeed OLED Displays
Before you get started, you will of course need an OLED Display first! Here at Seeed, we offer various OLED displays to suit your project needs like:
Grove – OLED Display 1.12 ” V2 ($14.90)
- Our 1.12” OLED displays are perfect when you need a small display with 16 grayscale.
- The visible portion of the OLED measures 1.12” diagonal and contains 96×96(version 1.0) | 128×128(version 2.0) grayscale pixels. Similar to the SSD1306 OLED, the display uses OLEDs, there is no backlight, and the contrast is very high.
- With the onboard 4-pin I2C Grove connector, you can easily plug-and-play with the screen and Arduino.
- Additionally, the max I2C bus speed was increased from 100KHz (V1) to 200KHz (V2). Now, the new 128×128 display has an 8 times higher pixel speed, making it a super fast high-resolution display compared to the older one.
0.5 Inch OLED display Arduino shield ($15.00)
- This is the smallest size display in all Arduino display modules by far!
- It features high contrast, brightness and low power consumption as it can produce its own light eliminating the need of a back light!
- The OCELL is a 0.5 inch (1.27 cm) OLED module which are made with 60×32 individual white OLED pixels and designed as an Arduino shield which is also available for other micro controllers.
- Even though they are very small, they are readable due to the high contrast (450cd/m^2 brightness)!
- You can connect it to Arduino micro directly without doing any PCB layout. It is a good choice for any maker to start a project which needs a tiny COOL OLED display.
- Its communication peripherals are the SPI and I2C
- In addition, it is supported by U8glib library and wiki which can be found here: U8LIB Library WIKI
Grove – OLED Display 0.96″ ($14.90)
- The Grove – OLED Display 0.96 inch features high brightness, self-emission, high contrast ratio, slim / thin outline, wide viewing angle, wide temperature range (-20℃ to 70℃), and low power consumption and uses a SSD1308Z Chip.
- It is able to display more contents due to its bigger screen compared to the OLED 96×96 too!
- Its communication mode is I2C.
Grove – OLED Display 0.96″ (SSD1315) ($3.90)
- This is an upgraded of the Grove – OLED Display 0.96″ chip (the product above) from SSD1308 to SSD1315.
- What’s the difference? To be honest, the performance is slightly improved, nothing much. BUT, we just lowered the price almost to a quarter of the old version. What! With Better performance, at a quarter of the price?! What a deal!!!
- Thanks to the new SSD1315 chip which is able to work with 3.3V, we are able to remove the expensive DC-DC boost circuit.
- In addition, with the onboard level shift circuit, the new Grove – OLED Display 0.96″ can work with 3.3V and 5V platform which you can use it easily as an Arduino OLED display, Raspberry Pi OLED display, etc.
- Features of this OLED display includes:
- 3.3V/5V Compatible
- Changeable I2C address
- Low Power Consumption
- Monochrome (white) 128 x 64 Pixels
- High Contrast, High Brightness.
- Wide Operating Temperature range: -40℃ to +85 ℃
When do you use it?
- This OLED display is just for you if you are looking for a beautiful, small, efficient display for your microcontroller. With a 128 x 64 pixel resolution with a 160° viewing angle and low power consumption, it will satisfy all your needs.
- Looking for a simple interface or saving pins? This OLED display will suit you as it has a low pin count and it only uses 2 bidirectional wires to establish communication among multiple devices as interfacing can be done with I2C.
How do you use it?
To get you started, here is a short tutorial on how the OLED display works with the Arduino!
What do you need?
- Seeeduino V4.2
- Base Shield V2 (used to connect Grove Modules to the Arduino Uno easily)
- Grove – OLED Display 0.96″ / Grove – OLED Display 1.12 ” V2 (pick one that suits your project the most)
Step by Step tutorial I2C display with Arduino
- Step 1 – Connect the OLED display onto the I2C port on Grove Base Shield
- Step 2 – Connect the Grove-Base shield into Seeeduino
- If you do not have a Grove Base shield you can also directly connect the OLED display to the Seeeduino as seen below:
Seeeduino | Grove – OLED Display 0.96 Inch |
5V | Red (pin 3) |
GND | Black (pin 4) |
SDA | White (pin 2) |
SCL | Yellow (pin 1) |
- Step 3 – Connect Seeeduino to the PC via a USB cable
It should look something like this at this point!
- Step 4 – Refer to How to install library to install library for Arduino
- For OLED 1.12, download this file: Download Library for OLED 1.12
- Upload OLED_Hello_World to Seeeduino V4. Open your Arduino IDE, click on File > Example > OLED_Display_96x96-master > OLED_Hello_World
- For OLED 0.96, download this file: Seeed OLED Display 128*64 library
- For OLED 1.12, download this file: Download Library for OLED 1.12
- Step 5– Copy the code into Arduino IDE and upload. If unsure how to upload, you can take a look at this tutorial: Uploading Code
#include <Wire.h>
#include <SeeedOLED.h>
void setup()
{
Wire.begin();
SeeedOled.init(); //initialze SEEED OLED display
SeeedOled.clearDisplay(); //clear the screen and set start position to top left corner
SeeedOled.setNormalDisplay(); //Set display to normal mode (i.e non-inverse mode)
SeeedOled.setPageMode(); //Set addressing mode to Page Mode
SeeedOled.setTextXY(0, 0); //Set the cursor to Xth Page, Yth Column
SeeedOled.putString("Hello World!"); //Print the String
}
void loop()
{
}
- After uploading the code, you should be able to see “Hello World” on screen as seen below!
You can then play around with the Arduino and try other examples! (The Grove OLED displays are supported on all platforms like the Raspberry Pi, Arduino, Beaglebone, Wio and also LinkIt ONE.)
You can click here for the tutorial on how to connect your OLED display to the Raspberry Pi, Beaglebone Green: Wiki Seeed Studio – OLED Display 0.96 Inch
Arduino OLED Projects Ideas
Now that you have the basic knowledge of how an OLED display works, why not test your skills at some of these projects ideas! Do note that a SSD1306 OLED display works fine too with these projects.
DIY OLED Display Watch
Ever wanted to create your very own watch? Well with the Seeed Grove – OLED Display 1.12” V2 and an Arduino, you can do just that!
What do you need?
- Seeeduino V4.2
- Grove – OLED Display 1.12 ” V2
- Seeed Grove – RTC
- Jumper wires (generic)
You can find the full tutorial here at : Seeed Project Hub – DIY Cool Watch
Smart OLED Display Badge
Don’t you wish you have a smart animated name badge? With Seeed OLED display, it is now possible!
What do you need?
- Grove – OLED Display 1.12 ” V2
- DigiSpark
- Arduino Mini 05
- Arduino IDE software
You can find the full tutorial here at : Seeed Project Hub – Smart Poetic OLED Display Badge
Summary
Please note as the OLED displays are made with many OLEDS which means every pixel is organic LED, to prevent the OLEDs from dimming and keep the display consistently bright, do turn off the display when not in use!
Now, with the knowledge of how to connect OLED displays to your Arduino, you can start creating your OLED display projects on your own! If you need more inspiration on project ideas, you can check out Seeed Project Hub – Grove – OLED Display 1.12″ V2!