Comments (11)
@winny2809 It's likely that your touch screen is not calibrated correctly, so you never touch any of the objects on the screen (e.g. buttons). However, the tpcal
example is designed to calibrate the screen so it will register touches anywhere.
from lv_port_esp32.
The problem is that even creating an object with the call function, when you touch any point on the screen no event is generated, an event is generated only by using the "tpcal_create" function.
It is as if only the "tpcal_create" function read the interrupt from the touch screen.
Why?
from lv_port_esp32.
tp_cal
checks to the whole display area for clicks. I suggest to printf
the measured raw touchpad data from your driver to see if it's correct.
from lv_port_esp32.
The problem is that even creating an object with the call function, when you touch any point on the screen no event is generated, an event is generated only by using the "tpcal_create" function.
That is because, as I said above, in the other examples there are small objects on the screen in various places. It just so happens that the current data you are reading from your touchscreen is not hitting those areas.
However, think of tpcal
as creating a huge button that covers the whole screen. No matter where the data you read claims you touch, the huge button will always get clicked as it fills the whole touchscreen.
As @kisvegabor said it's likely that the coordinate data you are reading is bogus.
from lv_port_esp32.
And then? in this case how should I proceed? Excuse me
from lv_port_esp32.
in this case how should I proceed?
First, let's figure out whether it's bogus or not. That is, does touching the top left of the screen give you roughly (0,0)
, and does touching the bottom right give you a coordinate around the screen width and height (i.e. for 240x320 (240, 320)
)?
from lv_port_esp32.
This is the result
from lv_port_esp32.
It's cleary the issue of the driver. Probably you read always 0xFF. Typically it indicates a problem with the SPI. (wrong pins or wrong configuration)
from lv_port_esp32.
I have the doit devkit v1 card.
My configuration is:
#define XPT2046_IRQ 25
#define ENABLE_TOUCH_INPUT 1
#define TP_SPI_MOSI 23
#define TP_SPI_MISO 19
#define TP_SPI_CLK 18
#define TP_SPI_CS 5
from lv_port_esp32.
the vspi configuration is:
void tp_spi_init(void)
{
esp_err_t ret;
spi_bus_config_t buscfg={
.miso_io_num=TP_SPI_MISO,
.mosi_io_num=TP_SPI_MOSI,
.sclk_io_num=TP_SPI_CLK,
.quadwp_io_num=-1,
.quadhd_io_num=-1
};
spi_device_interface_config_t devcfg={
.clock_speed_hz=10*1000*1000, //Clock out at 80 MHz
.mode=0, //SPI mode 0
.spics_io_num=-1, //CS pin
.queue_size=1,
.pre_cb=NULL,
.post_cb=NULL,
};
//Initialize the SPI bus
ret=spi_bus_initialize(VSPI_HOST, &buscfg, 2);
assert(ret==ESP_OK);
//Attach the LCD to the SPI bus
ret=spi_bus_add_device(VSPI_HOST, &devcfg, &spi);
assert(ret==ESP_OK);
}
from lv_port_esp32.
Let's continue in the Forum because more users read it.
Hopefully, somebody already has experience with this configuration.
from lv_port_esp32.
Related Issues (20)
- Cannot build project with LVGL as component HOT 1
- SPI display drivers do not play nice with other spi devices
- esp32-s3 invalid dma channel HOT 1
- Portrait mode of demos doesn't display correctly
- The link to the forum when you write a PR/issue is incorrect HOT 1
- build with esp-idf-4.4.3 fails HOT 1
- failed to run idf.py menuconfig HOT 3
- updated LVGL+squareline studio+ ESP32 HOT 2
- Demo on older esp-wrover-kit board ( not v4.1) HOT 2
- Display not showing the correct windows while running this example HOT 2
- Sunton ESP32-8048S070 board HOT 8
- How can I add my own components to the project
- Unable to compile on esp-idf version 5.0 HOT 4
- undefined reference to `lv_obj_set_scroll_propagation'
- Cant turn off LV_USE_FLEX
- Horizontal scrolling HOT 4
- fatal error: Arduino_H7_Video.h: No such file or directory
- ESP32C3 - non-LVGL task (temp reading) causes TFT display to go blank and stay blank on second run of task HOT 1
- ssd1306 driver
- ssd1306
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lv_port_esp32.