ST7735 please help with inital setup

Hi everybody,

I am struggling with this ST7735 board.

It has these PINs

  • LED
  • SCK
  • SDA
  • A0
  • RESET
  • CS
  • GND
  • VCC

According to its docs, one is supposed to use the ili9xxx docs instead.

If I understand those correct, only dc_pin and reset_pin are required. Is this correct? And if so, what is the dc pin?

This is the minimum example

# Example minimal configuration entry
display:
  - platform: ili9xxx
    model: ST7735
    dc_pin: GPIO X
    reset_pin: GPIO Y
    lambda: |-
      it.fill(COLOR_BLACK);
      it.print(0, 0, id(my_font), id(my_red), TextAlign::TOP_LEFT, "Hello World!");

I am planning to use this with ESP32; can somebody please tell me how to connect it to the board?

ESP32 ST7735
GND GND
5V VCC
GPIO X RESET
GPIO Y ???

I am basically not sure about this

  1. what is the dc pin on my ST7735
  2. are really only two pins required for this?
  3. which pin on the ST7735 do I use for dimable backlight (docs example)? I assume A0, is this correct?

Thanks for your input :slight_smile:

Documentation is a bit lacking in my opinion, not immediately obvious but you also need an SPI bus. The dc_pin is A0 and the LED pin controls the backlight, I’d just connect latter to 3.3v until you got it working. This should help with connecting

Add a SPI block, SDA on the board is MOSI, SCK is CLK. Connect to suitable pins - e.g:

spi:
  clk_pin: GPIO18
  mosi_pin: GPIO23

Also DC is marked as A0 on your board.

LED is the backlight pin. Create a PWM monochrome light and assign to the GPIO attached to that pin:

# backlight pin as PWM GPIO32
output:
  - platform: ledc
    pin: 32
    id: gpio_32_backlight_pwm

# define as light
light:
  - platform: monochromatic
    output: gpio_32_backlight_pwm
    name: "Backlight"
    id: back_light
    restore_mode: ALWAYS_ON