SSD1306/SH1106 Driver for esp-idf
Go to file
2022-05-19 18:09:38 +09:00
AnimationDemo Update README.md 2022-05-04 14:50:36 +09:00
components/ssd1306 Fixed a bug when Flip upside down was enabled 2022-05-19 18:09:38 +09:00
CounterDemo Added ScrollCounterDemo 2022-05-05 07:51:29 +09:00
ImageDemo Update README.md 2022-05-05 07:58:51 +09:00
MeterDemo Deleted Erase needle 2022-05-13 18:46:39 +09:00
ScrollCounterDemo Changed delay timing 2022-05-05 08:11:45 +09:00
TextDemo Update README.md 2022-04-26 15:23:18 +09:00
WrapAroundDemo Changed from RotateDemo to WarpAroundDemo 2022-04-26 20:11:08 +09:00
LICENSE Create LICENSE 2022-05-04 07:24:16 +09:00
README.md Changed to components 2022-04-26 15:21:29 +09:00
SSD1306_DataFormat.txt Create SSD1306_DataFormat.txt 2022-05-05 08:37:39 +09:00

esp-idf-ssd1306

SSD1306/SH1106 driver for esp-idf

I used this repository as a reference.
I used this font file.

Software requirements

esp-idf v4.4 or later.
This is because this version supports ESP32-C3.

Installation for

git clone https://github.com/nopnop2002/esp-idf-ssd1306
cd esp-idf-ssd1306/TextDemo/
idf.py set-target {esp32/esp32s2/esp32s3/esp32c3}
idf.py menuconfig
idf.py flash

Note
For some reason, there are development boards that cannot use GPIO06, GPIO08, GPIO09, GPIO19 for SPI clock pins.
According to the ESP32C3 specifications, these pins can also be used as SPI clocks.
I used a raw ESP-C3-13 to verify that these pins could be used as SPI clocks.

Configuration

You have to set this config value with menuconfig.

  • CONFIG_INTERFACE
  • CONFIG_PANEL
  • CONFIG_OFFSETX
  • CONFIG_FLIP
  • CONFIG_SDA_GPIO
  • CONFIG_SCL_GPIO
  • CONFIG_RESET_GPIO
  • CONFIG_MOSI_GPIO
  • CONFIG_SCLK_GPIO
  • CONFIG_CS_GPIO
  • CONFIG_DC_GPIO

config-main


Generic SSD1306 128x32 i2c

128x32 config-128x32_i2c


Generic SSD1306 128x64 i2c

128x64 config-128x64_i2c


Generic SH1106 128x64 i2c

Hardware scroll Not support
Left:1.3 inch SH1106
Right:0.96 inch SSD1306

SH1106_i2c config-sh1106_i2c


128x64 TTGO

Unlike other ESP32 development boards, the RTC_CLOCK crystal on this board uses a 26MHz one.
You need to change the RTC CLOCK frequency to 26MHz using menuconfig.

ESP32-TTGO-1 ESP32-TTGO-2 128x64_Reset config-128x64_TTGO


128x64 ESP-WROOM-32

ESP32-OLED-2 config-ESP-WROOM-32


Generic SSD1306 128x32 SPI

128x32_spi config-128x32_spi


Generic SSD1306 128x64 SPI

D0 is SCLK.
D1 is MOSI.

128x64_spi config-128x64_spi


Generic SH1106 128x64 SPI

Hardware scroll Not support
Left:1.3 inch SH1106
Right:0.96 inch SSD1306

SH1106_spi config-sh1106_spi


Flip upside down

config_flip

ssd1306_flip