The pinout ordering is the same for both the 1.27" and 1.5" version of the OLED!
The library supports flexible wiring to minimize pin conflicts with other shields and breakouts. For the initial test, we'll use the same wiring as the "test" example from the library:
GND -> GND (G)
5v -> VIN (+)
#2 -> SCLK (CL)
#3 -> MOSI (SI)
#4 -> DC
- #5 -> OLEDCS (OC)
#6 -> RST (R)
If you are confused by the abbreviations on the front of the board, the full signal names are printed on the back!
Installing the Arduino software
Now we can run the test software on the Arduino.
Three libraries need to be installed using the Arduino Library Manager…this is the preferred and modern way. From the Arduino “Sketch” menu, select “Include Library” then “Manage Libraries…”
Type “gfx” in the search field to quickly find the first library — Adafruit_GFX:
Repeat the search and install steps, looking for the Adafruit_ZeroDMA and Adafruit_SSD1351 libraries.
After you restart, you should be able to select File→Examples→Adafruit_SSD1351→test - this is the example sketch that just tests the display by drawing text and shapes. Upload the sketch and you should see the following:
This guide was first published on Aug 16, 2013. It was last
updated on Aug 16, 2013.
This page (Wiring and Graphics Test) was last updated on Dec 11, 2018.
The test sketch demonstrates all the basic drawing functions of the Adafruit GFX Library. Read through the code to see how to draw text, circles, lines, etc.For a detailed tutorial on the Adafruit GFX library, including all the functions available please visit the GFX tutorial page