Hello,
the touchscreen seems buggy for me…sometimes it doesnt work after power on.
i found some guys put the adress of I2C like address: 0x5D
but it doesnt work well.
here is my config, hope its not the sleeping mode that make it buggy :
touchscreen:
platform: gt911
id: my_touchscreen
# address: 0x5D
display: my_display
interrupt_pin: 38
on_touch:
- if:
condition: lvgl.is_paused
then:
- light.turn_on: back_light
- lvgl.resume:
- lvgl.widget.redraw:
- logger.log:
format: Touch at (%d, %d)
args: [touch.x, touch.y]
- lambda: |-
ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
touch.x,
touch.y,
touch.x_raw,
touch.y_raw
);
perhaps i will try without the debug part like this :
touchscreen:
platform: gt911
id: my_touchscreen
# address: 0x5D
display: my_display
interrupt_pin: 38
on_touch:
- if:
condition: lvgl.is_paused
then:
- light.turn_on: back_light
- lvgl.resume:
- lvgl.widget.redraw:
dont know if it will make a diffrence…nobody experience problem with touchscreen?
EDIT : same problem without logger.
strange thing is 2 I2c adress are detected :
[18:03:08][I][i2c.idf:102]: Results from i2c bus scan:
[18:03:08][I][i2c.idf:108]: Found i2c device at address 0x18
[18:03:08][I][i2c.idf:108]: Found i2c device at address 0x5D
i have read a lot of comments and elecrow team said 0x5D is the adress of the touchscreen, but why 0x18 is detected and what hardware is it???
the problem seems really random, i try several usb cable and power source…really random…sure its a starting problem with software, not hardware.