spi: - id: lcd_spi clk_pin: GPIO48 mosi_pin: GPIO47 i2c: - id: bus_a sda: GPIO19 scl: number: GPIO45 ignore_strapping_warning: true frequency: 100kHz output: # Backlight LED - platform: ledc pin: GPIO38 id: backlight_output frequency: 100Hz light: # Backlight - platform: monochromatic output: backlight_output name: Backlight id: display_backlight restore_mode: ALWAYS_ON on_turn_on: - if: condition: lvgl.is_paused then: - logger.log: "LVGL resuming by backlight on" - lvgl.resume: - lvgl.widget.redraw: on_turn_off: - if: condition: lambda: 'return id(display_timeout_number).state >= 0;' then: - logger.log: "Backlight off, pausing LVGL" - lvgl.pause: touchscreen: - platform: gt911 id: my_touchscreen transform: mirror_x: false mirror_y: false display: my_display on_release: - if: condition: lvgl.is_paused then: - logger.log: "LVGL resuming" - lvgl.resume: - lvgl.widget.redraw: - light.turn_on: display_backlight display: - platform: st7701s id: my_display update_interval: never auto_clear_enabled: false data_rate: 2MHz spi_mode: MODE3 color_order: RGB invert_colors: false dimensions: width: 480 height: 480 transform: mirror_x: false mirror_y: false cs_pin: 39 # reset not defined de_pin: 18 hsync_pin: 16 vsync_pin: 17 pclk_pin: 21 init_sequence: - 1 - [0xFF, 0x77, 0x01, 0x00, 0x00, 0x10] # CMD2_BKSEL_BK0 - [0xCD, 0x00] # disable MDT flag pclk_frequency: 12MHz pclk_inverted: false data_pins: red: - 11 # R1 - 12 # R2 - 13 # R3 - 14 # R4 - 0 # R5 green: - 8 # G0 - 20 # G1 - 3 # G2 - 46 # G3 - 9 # G4 - 10 # G5 blue: - 4 # B1 - 5 # B2 - 6 # B3 - 7 # B4 - 15 # B5