From 662c39a3849ca8e9c35718d5436ea3dc87f7b0ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl-Petter=20=C3=85kesson?= Date: Sat, 7 Feb 2026 18:44:15 +0100 Subject: [PATCH] Add hardware profile for ViewDisplay ESP32 Round TFT Knob 2.1" Tested to compile on v1.0.0 RC2.16 --- .../viewdisplay-esp32-s3-uedx48480021.yaml | 180 ++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 custom_components/esphome_designer/frontend/hardware/viewdisplay-esp32-s3-uedx48480021.yaml diff --git a/custom_components/esphome_designer/frontend/hardware/viewdisplay-esp32-s3-uedx48480021.yaml b/custom_components/esphome_designer/frontend/hardware/viewdisplay-esp32-s3-uedx48480021.yaml new file mode 100644 index 00000000..9651568b --- /dev/null +++ b/custom_components/esphome_designer/frontend/hardware/viewdisplay-esp32-s3-uedx48480021.yaml @@ -0,0 +1,180 @@ +# ============================================================================ +# ESPHome YAML - Generated by ESPHome Designer +# ============================================================================ +# TARGET DEVICE: ViewDisplay ESP32 2.1 Inch 480×480 Round TFT Knob UEDX48480021-MD80ET +# - ESP32: ESP32-S3 +# - Display Platform: 2.1-inch color TFT display screen with st7701s driver +# - PSRAM: Yes (Octal, 80MHz) +# - Touchscreen: cst816 +# - Framework: ESP-IDF +# Name: Guition ViewDisplay ESP32 2.1 Inch 480×480 Round TFT Knob UEDX48480021-MD80ET +# Resolution: 480x480 +# Shape: round +# ============================================================================ +# +# BASED ON: +# - https://viewedisplay.com/product/esp32-2-1-inch-480x480-round-tft-knob-display-rotary-encoder-arduino-lvgl/ +# - https://github.com/VIEWESMART/UEDX48480021-MD80ESP32-2.1inch-Touch-Knob-Display +# - https://github.com/esphome/feature-requests/issues/3254 +# +# Hardware configuration adapted for ESPHome Designer. +# +# ============================================================================ +# +# SETUP INSTRUCTIONS: +# +# STEP 1: Copy the Material Design Icons font file +# - From this repo: resources/fonts/materialdesignicons-webfont.ttf +# - To ESPHome: /config/esphome/fonts/materialdesignicons-webfont.ttf +# (Create the fonts folder if it doesn't exist) +# +# STEP 2: Create a new device in ESPHome +# - Click "New Device" +# - Name: your-device-name +# - Select: ESP32 +# - Framework: ESP-IDF (Required for this device) +# +# STEP 3: PASTE this snippet into your device YAML +# - Paste this snippet at the end of your configuration. +# - System sections (esphome, esp32, psram, etc.) are auto-commented +# to avoid conflicts with your existing setup. +# +# ============================================================================ + +substitutions: + name: "viewdisplay_esp32_s3_knob_2_1" + friendly_name: 'ViewDisplay ESP32 Round TFT Knob 2.1"' + device_description: "ViewDisplay ESP32 2.1 Inch 480×480 Round TFT Knob UEDX48480021-MD80ET" + project_name: "karl-petter.ESPHomeDesigner_ViewDisplay_ESP32_S3_UEDX48480021" + project_version: "1.0.0" + #GPIO pins for the LCD screen + mosipin: GPIO12 + sclkpin: GPIO13 + cspin: GPIO18 + rstpin: GPIO8 + depin: GPIO17 + hsyncpin: GPIO46 + vsyncpin: GPIO3 + pclkpin: GPIO9 + # GPIO pins for backlight + blpin: GPIO7 + # GPIO pins for touchscreen + ts_rstpin: GPIO8 + sdapin: GPIO16 + sclpin: GPIO15 + # Encoder pins + enc_pin_a: GPIO6 + enc_pin_b: GPIO5 + enc_button_pin: GPIO0 + logger: DEBUG + +esphome: + friendly_name: $friendly_name + name: $name + project: + name: "${project_name}" + version: "${project_version}" + +# BOARD +esp32: + board: esp32-s3-devkitc-1 + framework: + type: esp-idf + +psram: + mode: octal + speed: 80MHz + +# DISPLAY +spi: + clk_pin: + number: $sclkpin + allow_other_uses: true + mosi_pin: + number: $mosipin + allow_other_uses: true + +display: + - platform: st7701s + id: my_display + dimensions: + width: 480 + height: 480 + cs_pin: $cspin + reset_pin: + number: $rstpin + allow_other_uses: True + de_pin: $depin + hsync_pin: $hsyncpin + vsync_pin: $vsyncpin + pclk_pin: $pclkpin + data_pins: + red: + - 40 #r1 + - 41 #r2 + - 42 #r3 + - 2 #r4 + - 1 #r5 + green: + - 21 #g0 + - 47 #g1 + - 48 #g2 + - 45 #g3 + - 38 #g4 + - 39 #g5 + blue: + - 10 #b1 + - 11 #b2 + - number: 12 #b3 + allow_other_uses: True + - number: 13 #b4 + allow_other_uses: True + - 14 #b5 + color_order: RGB + hsync_pulse_width: 255 + hsync_front_porch: 1 + hsync_back_porch: 255 + vsync_pulse_width: 254 + vsync_front_porch: 2 + vsync_back_porch: 254 + show_test_card: True + +switch: + - name: "Backlight" + id: backlight + platform: gpio + pin: $blpin + inverted: True + restore_mode: ALWAYS_ON + +# TOUCHSCREEN +i2c: + sda: $sdapin + scl: $sclpin + +touchscreen: + - platform: cst816 + id: knob_touchscreen + reset_pin: + number: $ts_rstpin + allow_other_uses: True + +# ENCODER +sensor: + - name: "Rotary Encoder" + id: knob_encoder + platform: rotary_encoder + pin_a: $enc_pin_a + pin_b: $enc_pin_b + resolution: 2 + internal: True + +binary_sensor: + - name: "Buttton" + id: encoder_button + platform: gpio + pin: + number: $enc_button_pin + inverted: True + ignore_strapping_warning: True + internal: True \ No newline at end of file