Hi, after several trials I was able to appear an Hello World on my Makerfabs Matouch 7 inc display using LovyanGFX and LVGL 9.1
The issues I can’t solve is the touchscreen: the touch is working fine and i can read the coordinate of each touch but LVGL is not able to handle it.
I implemented the function:
void touchscreen_read(lv_indev_t * indev, lv_indev_data_t*data)
{
if(lcd.getTouch(&x, &y)) {
data->point.x = x;
data->point.y = y;
data->state = LV_INDEV_STATE_PRESSED;
} else {
data->state = LV_INDEV_STATE_RELEASED;
}
Serial.println(data->point.x);
}
But it doesn’t read the touch. With the same code in the loop section I can print the touch coordinates on serial. IT seems like this function doesn’t run. I used this code to implement the touch in LVGL:
// Start LVGL
lv_init();
// Initialize an LVGL input device object (Touchscreen)
lv_indev_t* indev = lv_indev_create();
lv_indev_set_type(indev, LV_INDEV_TYPE_POINTER);
// Set the callback function to read Touchscreen input
lv_indev_set_read_cb(indev, touchscreen_read);
Can anybody help me?
The board i use has the following specs:
- Controller: ESP32-S3-WROOM-1, PCB Antenna, 16MB Flash, 8MB PSRAM, ESP32-S3-WROOM-1-N16R8
- Wireless: Wifi& Bluetooth 5.0
- LCD: 7 inch High Lightness IPS
- FPS: >30
- Resolution: 800480/1024600
- LCD interface: RGB 565
- Touch Panel: 5 Points Touch, Capacitive
- Touch Panel Driver: GT911
- USB: Dual USB Type-C(one for USB-to-UART and one for native USB)
- UART to UART Chip: CP2104
- Power Supply: USB Type-C 5.0V(4.0V~5.25V)
- Button: Flash button and reset button
- Mabee interface: 1I2C;1GPIO
- MicroSD: Yes
- Arduino support: Yes
- Type-C Power Delivery: Not Supported
- Operation temperature: -40℃ to +85℃
Thanks