Guest User

Untitled

a guest
Apr 9th, 2025
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. # For Waveshare 4.3" ESP32 board.
  2.  
  3. substitutions:
  4. friendly_name: Waveshare Display Panel
  5.  
  6. esphome:
  7. name: wave-7
  8. friendly_name: ${friendly_name}
  9. platformio_options:
  10. build_unflags: -Werror=all
  11. board_build.flash_mode: dio
  12.  
  13. esp32:
  14. board: esp32-s3-devkitc-1
  15. framework:
  16. type: esp-idf
  17. platform_version: 6.8.1
  18. version: 5.3.0
  19. sdkconfig_options:
  20. CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
  21. CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
  22. CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
  23. CONFIG_SPIRAM_RODATA: y
  24.  
  25. api:
  26.  
  27. logger:
  28. hardware_uart: UART0
  29.  
  30. wifi:
  31. id: wifi_status
  32. networks:
  33. - ssid: !secret wifi_1_ssid
  34. password: !secret wifi_1_password
  35. - ssid: !secret wifi_2_ssid
  36. password: !secret wifi_2_password
  37.  
  38. ota:
  39. platform: esphome
  40.  
  41. ch422g:
  42. id: ch422_hub
  43.  
  44. psram:
  45. mode: octal
  46. speed: 80MHz
  47.  
  48. output:
  49. - platform: ledc
  50. id: backlight
  51. pin: GPIO11
  52. # frequency: 1220Hz
  53. # inverted: true
  54.  
  55. # Note: this requires a hardware modification to work - GPIO 13 must be connected to the backlight PWM pad.
  56.  
  57. light:
  58. - platform: monochromatic
  59. output: backlight
  60. name: LCD Backlight
  61. id: lcd_backlight
  62. restore_mode: ALWAYS_ON
  63. # default_transition_length: 0s
  64. # gamma_correct: 1.8
  65. # effects:
  66. # - pulse:
  67.  
  68. switch:
  69. - platform: template
  70. name: antiburn
  71. icon: mdi:television-shimmer
  72. optimistic: true
  73. entity_category: "config"
  74. turn_on_action:
  75. - logger.log: "Starting Antiburn"
  76. - if:
  77. condition: lvgl.is_paused
  78. then:
  79. - lvgl.resume:
  80. - lvgl.widget.redraw:
  81. - lvgl.pause:
  82. show_snow: true
  83. turn_off_action:
  84. - logger.log: "Stopping Antiburn"
  85. - if:
  86. condition: lvgl.is_paused
  87. then:
  88. - lvgl.resume:
  89. - lvgl.widget.redraw:
  90.  
  91. - platform: gpio
  92. name: Backlight Switch
  93. pin:
  94. ch422g: ch422_hub
  95. number: 2
  96. mode:
  97. output: true
  98. restore_mode: ALWAYS_ON
  99.  
  100. i2c:
  101. sda: 8
  102. scl: 9
  103. frequency: 400kHz
  104. scan: false
  105. id: bus_a
  106.  
  107. button:
  108. - platform: safe_mode
  109. name: Safe Mode Boot
  110. entity_category: diagnostic
  111.  
  112. touchscreen:
  113. - platform: gt911
  114. address: 0x5D
  115. id: my_touchscreen
  116. interrupt_pin: 4
  117. reset_pin:
  118. ch422g:
  119. number: 1
  120. on_touch:
  121. - lambda: |-
  122. ESP_LOGI("Touch", "Touch detected at x=%d, y=%d", touch.x, touch.y);
  123.  
  124. display:
  125. - platform: rpi_dpi_rgb
  126. id: rpi_disp
  127. #update_interval: never
  128. #rotation: 90
  129. auto_clear_enabled: false
  130. color_order: RGB
  131. pclk_frequency: 16MHz
  132. dimensions:
  133. width: 800
  134. height: 480
  135. reset_pin:
  136. ch422g:
  137. number: 3
  138. enable_pin:
  139. ch422g:
  140. number: 2
  141. de_pin:
  142. number: 5
  143. hsync_pin:
  144. number: 46
  145. ignore_strapping_warning: true
  146. vsync_pin:
  147. number: 3
  148. ignore_strapping_warning: true
  149. pclk_pin: 7
  150. pclk_inverted: true
  151. # 7" 800x480 params
  152. # hsync_back_porch: 8
  153. # hsync_front_porch: 8
  154. # hsync_pulse_width: 4
  155. # vsync_back_porch: 16
  156. # vsync_front_porch: 16
  157. # vsync_pulse_width: 4
  158. # 5" 1024x600 params
  159. # hsync_back_porch: 188
  160. # hsync_front_porch: 44
  161. # hsync_pulse_width: 88
  162. # vsync_back_porch: 16
  163. # vsync_front_porch: 3
  164. # vsync_pulse_width: 6
  165. # 4.3" 800x480 params
  166. hsync_back_porch: 8
  167. hsync_front_porch: 8
  168. hsync_pulse_width: 4
  169. vsync_back_porch: 16
  170. vsync_front_porch: 16
  171. vsync_pulse_width: 4
  172.  
  173. data_pins:
  174. red:
  175. - 1 #r3
  176. - 2 #r4
  177. - 42 #r5
  178. - 41 #r6
  179. - 40 #r7
  180. blue:
  181. - 14 #b3
  182. - 38 #b4
  183. - 18 #b5
  184. - 17 #b6
  185. - 10 #b7
  186. green:
  187. - 39 #g2
  188. - 0 #g3
  189. - 45 #g4
  190. - 48 #g5
  191. - 47 #g6
  192. - 21 #g7
  193.  
  194. lvgl:
Advertisement
Add Comment
Please, Sign In to add comment