Lanbon L8 Smart Switch Panel
Difficulty: Plug-n-flash, 2/5
Drivers
- Processor: ESP32-WROVER-B
- Touchscreen:
6336
- Display: ST7789 (using
ili9xxxx
plaform)
GPIO Pinout
SPI (used for display)
Pin | Function |
---|
GPIO19 | clock |
GPIO23 | mosi |
GPIO25 | miso |
GPIO22 | cs |
GPIO21 | dc |
GPIO18 | reset |
I²C (used for touchscreen)
Pin | Function |
---|
GPIO4 | i2c SDA |
GPIO0 | i2c SCL |
Backlight
Pin | Function |
---|
GPIO5 | backlight |
Mood Light
Pin | Function |
---|
GPIO26 | red |
GPIO32 | green |
GPIO33 | blue |
Relay (3-gang switch model)
Pin | Function |
---|
GPIO12 | relay #1 |
GPIO14 | relay #2 |
GPIO27 | relay #3 |
How To Flash
See BlackAdder's instruction on how to flash custom firmware.
No soldering required.
Example Configuration
psram:
speed: 80MHz
output:
- platform: ledc
pin: GPIO5
id: backlight_pwm
- platform: ledc
pin: GPIO26
id: moodRed
- platform: ledc
pin: GPIO32
id: moodGreen
- platform: ledc
pin: GPIO33
id: moodBlue
- platform: gpio
pin: GPIO12
id: relay_1
- platform: gpio
pin: GPIO14
id: relay_2
- platform: gpio
pin: GPIO27
id: relay_3
light:
- platform: rgb
name: "Mood Light"
red: moodRed
green: moodGreen
blue: moodBlue
- platform: monochromatic
name: "Backlight"
id: backlight
output: backlight_pwm
restore_mode: ALWAYS_ON
spi:
clk_pin: GPIO19
mosi_pin: GPIO23
miso_pin: GPIO25
i2c:
sda: GPIO4
scl: GPIO0
display:
- platform: mipi_spi
model: LANBON-L8
touchscreen:
platform: ft63x6
calibration:
x_min: 0
y_min: 0
x_max: 230
y_max: 312
on_release:
- if:
condition: lvgl.is_paused
then:
- lvgl.resume:
- lvgl.widget.redraw:
- light.turn_on: backlight
lvgl:
on_idle:
timeout: !lambda "return 10000;"
then:
- light.turn_off: backlight
- lvgl.pause:
pages:
...
Edit this page on GitHub