RPi 4 OLED Problems

Hello, i have a problem to get my OLED work.

First, i am a Noob about this.

My Setup = Oled Pins and RPi4 GPIOs:
RST = GPIO13
CS = GPIO24
DC = GPIO22
SDA = GPIO19
SCL = GPIO23
GND = GPIO6
VCC = GPIO1

My Code :

  clk_pin: GPIO23
  mosi_pin: GPIO19
display:
  - platform: sh1107_spi
    model: SH1107 128x128
    cs_pin: GPIO24
    dc_pin: GPIO22
    reset_pin: GPIO13
    lambda: it.print(0, 0, id(font), "Hello World!");**

The Code was in YAML under Config.

German Language welcome!

You are confusing ESPHome and Home Assistant. HA does not support a display directly connected to a RPi 4. That yaml is for connecting a display to an ESP8266 or ESP32 using ESPHome.

OK, what can id do?

Assuming you want to display information from Home Assistant on an OLED display, buy an ESP32 (preferably one with PSRAM) and connect it to that.

Once you get ESPHome up and running on a device and the “Hello world” working, people will help with the next steps.

Here is a suitable board listed on Aliexpress:

https://www.aliexpress.com/item/32851423415.html

1 Like

Thank you so much!

Which one casn i get?

-C3
-S3
-CH9102

Personally - I use the older boards - like this one off amazon.de that would suit. Quicker than ordering from China.

https://www.amazon.de/-/en/Espressif-ESP32-DevKitC-VIE-Development-ESP32-WROVER-IE-Bluetooth/dp/B087TF2L27/ref=sr_1_1

Any of the other boards are fine but for larger display you need to ensure the device has at least 8Mb of PSRAM, so read the listings carefully.

Best of luck and reach out to the forums if you get stuck with your first flash of ESPHome.