Arduino Leonardo Pro Micro With 128X64 OLED Display Tutorial On Breadboard

Teacher
Vivek Gupta
Vivek Gupta
Role : Writing free tutorials in free time
  • Website : http://vsgupta.in/
  • Experience : 5+ Years
  • Specialist in : IoT, NLP, Machine Learning, Chatbots, Voice Assistants, Hardware Engineering
Read More

Adding the Adafruit OLED library in Arduino IDE and programming Arduino Leonardo Pro Micro Part-2

Introduction

If you are seeing this tutorial directly, then you can start from beginning where I have included the step-wise images for making the breadboard circuit here "128X64 OLED display Arduino Tutorial" . So now continuing our previous tutorial, after installation of library, lets program our Arduino Leonardo Pro micro to display default graphics on 128x64 OLED display. Just follow the following steps:

  1. After installing the library, open your Arduino IDE and copy the following program and upload it on your Arduino(Make sure that you have made the circuit given in previous lesson ).

 

Adding-the-Adafruit-OLED-library-in-Arduino-IDE-and-programming-Arduino-Leonardo-Pro-Micro-Part-2 (1)

Adding-the-Adafruit-OLED-library-in-Arduino-IDE-and-programming-Arduino-Leonardo-Pro-Micro-Part-2 (1)

2. After uploading the sketch, open your serial terminal by clicking on the "magnifying glass" icon on the top right corner of Arduino IDE. In the serial terminal, you will get the address of your device. Note that we will be using I2C protocol for connecting with your OLED screen. So copy this adress "0x3C" . It might be different for different Arduino Boards.

Adding-the-Adafruit-OLED-library-in-Arduino-IDE-and-programming-Arduino-Leonardo-Pro-Micro-Part-2 (2)

Adding-the-Adafruit-OLED-library-in-Arduino-IDE-and-programming-Arduino-Leonardo-Pro-Micro-Part-2 (2)

3. Now, close the serial terminal and goto "file->Examples->Adafruit SSD1306->ssd1306_128x64_i2c" and click.

Adding-the-Adafruit-OLED-library-in-Arduino-IDE-and-programming-Arduino-Leonardo-Pro-Micro-Part-2 (3)

Adding-the-Adafruit-OLED-library-in-Arduino-IDE-and-programming-Arduino-Leonardo-Pro-Micro-Part-2 (3)

4. And then replace the "address" which you copied earlier from serial terminal from the default address as shown below in image.

Adding-the-Adafruit-OLED-library-in-Arduino-IDE-and-programming-Arduino-Leonardo-Pro-Micro-Part-2 (4)

Adding-the-Adafruit-OLED-library-in-Arduino-IDE-and-programming-Arduino-Leonardo-Pro-Micro-Part-2 (4)

5. Hit upload sketch, and your Arduino will start running the default library file. And if everything is okay, then you will get the following output :

Cheer! you have successfully connected an 128x64 OLED screen with Arduino Pro Micro. In the next tutorial, We will show output of sensor on the OLED screen.

Please login to get access to the quiz
Adding the Adafruit OLED library in Arduino IDE and programming Arduino Leonardo Pro Micro Part-1 (Prev Lesson)
Back to Arduino Leonardo Pro Micro With 128X64 OLED Display Tutorial On Breadboard

No Comments

Post a Reply