Connecting an OLED SSD1306 Screen to Arduino
| October 7th, 2015
I received an OLED Screen in the mail, that works with an Arduiono. When I wanted to connect it to the Arduino, I found it had different pin markings to the normal
one usually sold. It turns out they are similar. After some trial and error I got the standard demo Hello World to work. This is how it is done!
All the documentation on the web shows a different pin numbers. The one I have, has the following pins: GND, VCC, CLK, MOSI, DC, CS. The connection is as follows:
Here are the steps to get the screen to work:
- Connect the screen to the Arduino using the pin configuration above.
- Download the u8glib software. The latest version is available on GitHub.
- Create a folder called U8glib in your Arduino library folder C:\Program Files\Arduino\libraries\U8glib
- Copy the scr folder from the ZIP file into the U8glib folder.
- In the Arduino software, open the Hello World example code File / Examples / U8glib / HelloWorld
- Select the screen you are using and uncomment out the configuration line (Line 87).
- Compile and run the code. The screen should light up and the words "Hello World" should appear.
The Arduino code can be Downloaded Here (Version 1.18.1) or view the latest version on GitHub
The Datasheet can be downloaded Here