GithubHelp home page GithubHelp logo

digiexchris / esp-idf-ssd1306 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nopnop2002/esp-idf-ssd1306

0.0 0.0 0.0 450 KB

Renamed SSD1306/SH1106 Driver for esp-idf to fix naming collision with esp-idf ssd1306 component

License: MIT License

C 97.41% Makefile 1.17% CMake 1.43%

esp-idf-ssd1306's Introduction

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/V5.x.

Note for ESP32C2.
ESP-IDF V5.0 ESP32C2 i2c driver has a bug.
ESP-IDF V5.1 is required when using i2c of ESP32C2.

Note for ESP32C6.
ESP-IDF V5.1 is required when using ESP32C6.

Installation

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

Note for ESP32C3
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


I2C Port selection

config-i2c-port

The ESP32 series has two I2C Ports.
You can use these two ports freely.
If you use this module at the same time as another I2C device using I2C port 0, you must change it to I2C port 1.


SPI BUS selection

config-spi-bus

The ESP32 series has three SPI BUSs.
SPI1_HOST is used for communication with Flash memory.
You can use SPI2_HOST and SPI3_HOST freely.
When you use SDSPI(SD Card via SPI), SDSPI uses SPI2_HOST BUS.
When using this module at the same time as SDSPI or other SPI device using SPI2_HOST, it needs to be changed to SPI3_HOST.
When you don't use SDSPI, both SPI2_HOST and SPI3_HOST will work.
Previously it was called HSPI_HOST / VSPI_HOST, but now it is called SPI2_HOST / SPI3_HOST.


Flip upside down

config_flip

ssd1306_flip

esp-idf-ssd1306's People

Contributors

nopnop2002 avatar vadkor avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.