Cool. I actually would like to try to get this thing working under esphome using the esp-idf framework (instead of arduino) at some point in time as it’s more memory efficient so might leave more room to enable things like esp32_ble_tracker to work without causing the thing to randomly reboot due to low memory. As I have one now in pretty much every room it would be handy to have for presence tracking. Sadly I haven’t been able to get it to work without errors, albeit I will admit I didn’t spend a lot of time on it.
Hi, this configuration works for running lvgl. Does anyone know how to move between screens using lvgl?
# Display configuration
display:
- platform: ili9xxx
model: GC9A01A
id: watchface
reset_pin: $repin
cs_pin: $cspin
dc_pin:
number: $dcpin
ignore_strapping_warning: true
invert_colors: True
auto_clear_enabled: False
# Touchscreen configuration
touchscreen:
- platform: cst816
id: my_touch_screen
i2c_id: i2c_touch
# LVGL Configuration
lvgl:
displays:
- watchface
touchscreens:
- my_touch_screen
pages:
- id: main_page
widgets:
- label:
align: CENTER
text: 'Hello World!'
- button:
id: hello_button
align: CENTER
on_click:
- lambda: |-
ESP_LOGI("Button", "Hola");
- id: second_page
widgets:
- label:
align: CENTER
text: 'Esta es la Segunda Página'
# Gesture handling with touch events
text_sensor:
- platform: CST816S_touchscreen
id: my_touch_screenx
on_value:
then:
- script.execute: screentime
Switching screens is in my example. Don’t use the whole YAML though as I need to share the updated version that works with newer ESPhome LVGL versions.
Put this at the bottom of your touchscreen section:
on_touch:
then:
lvgl.page.next:
thank you!!!
As far as I can see, this thread is not only discussing one specific device but also anything similar So, I’ll add my two cents.
Recently, for my DIY project, I purchased a round display with a rotary encoder based on the ESP32C3.
I liked it very much. The build and material quality are very high. It looks great, and the knob has satisfying tactile feedback. The display is bright with wide viewing angles. While this product does not have a touch screen, for such a compact size, it is not necessary, as the encoder knob is sufficient.
This display is available on AliExpress for about $20. It is based on the ESP32C3 chip and features a round IPS display with a 240x240 resolution, a GC9A01A display driver with LVGL support, PWM-controllable backlight, and an aluminum rotary encoder knob around the display with a push-button function. As far as I can tell, it uses a similar screen and display driver to the M5Dial, but with fewer peripheral components. However, it’s almost twice as cheap, has a more minimalist design, and can be used in projects where the M5Dial is not suitable due to its overly colorful and flashy appearance.
I created two templates for connecting it to ESPHome. The first template is basic, while the second one enables LVGL support.
I created a separate thread for this device, where you’ll find ready-made templates, a brief overview, and resource links:
Here’s a video with ESPHome & LVGL:
Link to the manufacturer’s store:
Heh, thanks, I’ve bought the same one and I thought mine was bricked as well
also, can I ask a stupid question? I’m now on this forum, is this your latest sample code version?
or rather this?
Both should be fine - I’ve tried to keep them updated. I have however just updated the code from one of my wall controllers. There was a minor breaking change that I just needed to allow for.