Display on 128x128 SH1107 SPI OLED with RP2040 (Arduino Framework) using U8g2 lib.

Steps to setup library on Arduino IDE, to display on 1.12" 128x128 SH1107 SPI OLED with RP2040. Tested on WeAct RP2040 (16MB). Run example, using suitable constructor and run.


Library:

Install U8g2 in Arduino IDE Library Manager. U8g2 is a library for monochrome displays, version 2.

Connection:

Raspberry Pi Pico pre-defines SPI pins in Arduino are:
SPI_MOSI:    19
SPI_MISO:    16 (not use)
SPI_SCK:      18
Connection between RP2040 and SH1107 SPI OLED

    SH1107	RP2040
    ==================
    GND	    GND
    VCC	    3V3
    SCL	    GP18
    SDA	    GP19
    RES	    GP20
    DC	    GP21
    CS	    GP22

Example:

Open Examples > U8g2 > full_buffer > GraphicsTest

In my test, Use one of the constructors:
U8G2_SH1107_PIMORONI_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 22, /* dc=*/ 21, /* reset=*/ 20);
//U8G2_SH1107_SEEED_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 22, /* dc=*/ 21, /* reset=*/ 20);

Related:
Serial communication between two RP2040 (Arduino Framework)


Comments

Popular posts from this blog

480x320 TFT/ILI9488 SPI wih EP32C3 (arduino-esp32) using Arduino_GFX Library

my dev.tools - FNIRSI 2C23T 3-in-1 Dual Channel Oscilloscope/Multimeter/Signal Generator