-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Touch works only with the tpcal example #16
Comments
@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 |
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 As @kisvegabor said it's likely that the coordinate data you are reading is bogus. |
And then? in this case how should I proceed? Excuse me |
First, let's figure out whether it's bogus or not. That is, does touching the top left of the screen give you roughly |
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) |
I have the doit devkit v1 card. #define XPT2046_IRQ 25 #define ENABLE_TOUCH_INPUT 1 #define TP_SPI_MOSI 23 |
the vspi configuration is: void tp_spi_init(void)
} |
Let's continue in the Forum because more users read it. |
I imported this library in a platform underesp-idf environment.
All the graphic functions on the display work correctly, but unfortunately the touch in none of the examples works.
Only by calling the "tpcal_create ()" function for touch adjustment, the device receives the signal that the screen has been pressed. It is as if only the "touch" event is called in this function. How is it possible that only in this example does the touch work correctly?
Thanks, and congratulations for the great work you have done.
The text was updated successfully, but these errors were encountered: