Breaking

Site moved to https://diyusthad.com

Interfacing OLED 128x64 I2C with Arduino Uno



Introduction 

In this tutorial, we are going to learn to interface Arduino UNO with OLED 128x64 I2C Monochrome Display.

Skills Required

Basic: This tutorial is well explained for beginners.

Hardware Required

Arduino UNO  x  1
OLED 128x64  1
Breadboard  x  1
 Jumber cable  x  1


Circuit

Connect the pins of OLED with the following pins of Arduino UNO, as shown below.

Arduino UNO
OLED I2C Display
5v
VCC
GND
GND
SDA/A4
SDA
SCL/A5
SCL

Interfacing 128x64 OLED with Arduino UNO

Install Required Libraries 

Either you can download the libraries from Github and add the ZIP file in Arduino IDE using add .zip library option. 



Or you can install the libraries directly from Arduino IDE from Manage Libraries. Follow the below steps to install.

sketch -> include library -> manage libraries  
Open manage library from sketch -> include library -> manage libraries  

install adafruit ssd1306 library
 Then Search for AdafruitSSD1306 and click on the install button.

install adafruit gfx library
Then Search for the AdafruitGFX and click the install button. Now we have successfully installed the required libraries for this project.

Adafruit Example Code

Let's upload the adafruitSSD1306 library example program and test our setup.

Open the example program from File -> Examples -> Adafruit SSD1306 -> ssd1306_128x64_i2c,
because We are using OLED display with I2C interface with the screen size of 128x64.



Now let's Upload the code

Go to tool menu  -> Boards select Arduino UNO, then from Port select the port to which the Arduino is connected 




Video

Interfacing OLED 128x64 I2C with Arduino Uno Reviewed by Abu Yazid on February 20, 2019 Rating: 5
All Rights Reserved by Site Moved © 2014 - 2019

Contact Form

Name

Email *

Message *

Powered by Blogger.