SPI OLED with Ardiuno

                  Hi. Today I show you how to use OLED Display with Arduino UNO. first of all, you need an Arduino board and an OLED Display.


 There are many types of OLED displays by color & type of connection. In this experiment, I used a 128*64 blue color SPI OLED display.

Arduino Board

In this  experiment, I used Lakduino UNO  which is an Arduino compatible board. But you can use any Arduino board for this like pro, Nano, Leonardo etc.

Connecting Display to Arduino

My OLED Display has 7pins.

 OLED                  Arduino

    GND   ------->   GND
    VCC    ------->  3.3v
    CLK    ------->   D12
    MOSI  ------->   D11
    RES     ------->   D10
    DC       ------->  D 9
    CS       ------->  D 8

* However, my display worked without connecting GND and VCC.

Compile and upload code to Arduino

now we're going to upload the code for Arduino.
to do this you need Arduino IDE, Adafruit-GFX-Library and Adafruit_SH1106 library.
Libraries and source file can download from here.

Test it

now open serial monitor on Arduino IDE (Ctrl + Shift + M)
now type any thing which you want to display