Arduino Mega and 1.3 Inch OLED Display
Description
In this project we will connect a 1.3 Inch OLED display to a Arduino Mega. OK, so why use an OLED display? Some of the advantages are as follow;
- They are sunlight readable and each pixel is self luminous unlike a TFT where there is a back light to light the whole display.
- They are more energy efficient since only the pixels that are on is lit not the whole back light like a TFT display.
Ingredients
Setup (Hardware)
- Cut 4 pins from the male header.
- Solder the header to the board.
- Connect red wire from 3.3V(Arduino Mega) to VCC(Display)
- Connect brown wire from GND(Arduino Mega) to GND(Display)
- Connect blue wire from pin 20(Arduino Mega) to SDA(Display)
- Connect green wire from pin 21(Arduino Mega) to SCL(Display)
- Connect the USB cable to the computer
Setup (Software)
Do ensure you have done the necessary installation of software as per our setup blog
- Install the LCD drivers by selecting "Tools->Manage Libraries..", search for U8g2 and install the driver.
- Ensure you have selected the correct board for your project, if using a Arduino Mega select "Arduino/Genuino Mega or Mega 2560"
- Download the Script
- Ensure you have selected the correct COM port for the board.
- Upload the script, and you should see the following.