Code Monkey home page Code Monkey logo

esp_lcd_touch_xpt2046's People

Contributors

atanisoft avatar dvosully avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

esp_lcd_touch_xpt2046's Issues

working example

Hello @atanisoft and thank you for sharing your library.

Could you provide some working example that makes use of the LVGL framework with ESP-ISD v5.x.x?
It would be greatly appreciated.

Thanks!

touch coords conversion

Hi,
I'm using your component in a ESP32-2432S028 board. I'm running spi_lcd_touch example with ESP-IDF v5.0-rc1. I had to edit some lines at ESP_LCD_TOUCH_IO_SPI_XPT2046_CONFIG struct, but the touch component works fine! Thank you!

However, display buttons and touch coords do not match and I wonder what would be the best way to convert them applying some offsets. By now, I implemented data_convert function from esp_lcd_touch_stmpe610 component and looks good. But, would you do this conversion at app level? Maybe by implementing a process_coordinates callback function from esp_lcd_touch_config_t struct?

Thanks!

Not working with ILI9488

I try to use Touch with ILI9488 3,5" 480x320 V1.0 XPT2046
But i don't get any error or Data.

I had it working 2021 with an older version of driver.
https://github.com/lvgl/lvgl_esp32_drivers

I have disconnected the SDO from the touch, according too lvgl/lvgl_esp32_drivers#91
But even with that no data from the touch.

Do you have any idea what can be wrong? Its the same touch code that i use with an ili9341 where the xtp2046 is working with lvgl.

I use the esp error check function and so on but nothing, not even an error.

I call from the lvgl timer handler loop
ESP_ERROR_CHECK(esp_lcd_touch_read_data(tp));

but

void touch_driver_read(lv_indev_drv_t *drv, lv_indev_data_t *data)
{
    ESP_LOGI(TAG, "Read Touch Data");
    uint16_t x[1];
    uint16_t y[1];
    uint16_t strength[1];
    uint8_t count = 0;

    // Update touch point data.
    ESP_ERROR_CHECK(esp_lcd_touch_read_data(tp));

    data->state = LV_INDEV_STATE_REL;

    if (esp_lcd_touch_get_coordinates(tp, x, y, strength, &count, 1))
    {
        ESP_LOGI(TAG, "Touch Data %hu, %hu, %hu", *x, *y, *strength);
        data->point.x = x[0];
        data->point.y = y[0];
        data->state = LV_INDEV_STATE_PR;
    }

    data->continue_reading = false;
}

seems never get called.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.