128x64 oled arduno tutorial

Arduino OLED I2C Tutorial

Posted on

On this tutorial, we will learn how to use 128 × 64 OLED which is controlled by Arduino with I2C communication. In the market we can find this OLED can also communicate 8-bit parallel or serial wire. But in this tutorial I only use OLED with I2C communication. This 128 × 64 OLED is driven by the SSD1306 chip, which is a CMOS / PLED chip that controls the dot matrix pixel system. This SOLOMON SYSTECH  chip has features:

  • Dot-matrix resolution is 128 × 64
  • VDD 1.65 – 3.3V
  • VCC 7-15V
  • SRAM for 128 × 64 bit buffers
  • Works at temperatures of -40 to 85 degrees Celsius

If you need a datasheet from the ssd1306 chip, please download it here. Download SSD1306 Datasheet

 

Arduino OLED Library

For to communicate between 129 × 64 OLEDs with Arduino, we need a library, otherwise the program that will be made is very complicated. You can download the Library below.

Download Arduino OLED Library

The library was created by Henning Karlsen, the owner of the site Rinky Dink Electronics. If you want to see the original page, please click here. In the library there is a program that can display letters, numbers, bitmaps, graphs, running posts and more. Add this library to your arduino IDE. The steps are as follows:

  • Open Your Arduino IDE
  • Click Sketch > Include Library > Add. ZIP Library
  • Enter the OLED_I2C.zip library that you downloaded
  • Click Ok

 

OLED Schematic

For the circuit, because this OLED uses I2C communication, it only requires 4 pin oled arduino. Connect your 128 × 64 OLED to Arduino as shown below.

128x64 oled arduno schematic

To see the results of the sample program provided in OLED library, please open Arduino IDE, click File > Example > OLED_I2C > Arduino > For 128 × 64. Results of OLED library shown below.

  • Cubic Displays (OLED_I2C_3D_Cube)
    128x64 oled arduno tutorial
  • Showing the Bitmap (OLED_I2C_3D_ Bitmap)
    128x64 oled arduno tutorial
  • Change the screen brightness (OLED_I2C_3D_Brightness)
  • Showing Graphs (OLED_I2C_3D_Graph Demo)
    128x64 oled arduno tutorial
  • Showing Numbers (OLED_I2C_3D_NumberFonts)
    128x64 oled arduno tutorial
  • Change Screen Rotation (OLED_I2C_3D_RotateDisplay)
    128x64 oled arduno tutorial
  • Displaying Running Text (OLED_I2C_3D_Scrolling_Text)
    128x64 oled arduno tutorial
  • Make Sleep Mode (OLED_I2C_3D_SleepMode)
  • Showing Small Fonts (OLED_I2C_3D_TinyFont_View)
    128x64 oled arduno tutorial
  • Showing Medium Fonts (OLED_I2C_3D_View Font)
    128x64 oled arduno tutorial
Read other articles  LED Chaser With 4 Different Methods

You can edit the sample code of the program on the Example menu to your project. Very much can be made from this OLED, like as:

  • Wristwatch
  • Game Display
  • Temperature Viewer
  • Animated Bag Hangers
  • Information Viewer on Robots
  • Robot Eyes
  • Glass Toy Cars That Shadows Can Appear In People
  • QR Code viewer
  • and much more

Good work, happy learning.

Leave a Reply

Your email address will not be published. Required fields are marked *