PaulStoffregen / XPT2046_Touchscreen

Touchscreen Arduino Library for XPT2046 Touch Controller Chip
240 stars 84 forks source link

Return display coordinates besides the raw coordinates #44

Closed basvijfwinkel closed 1 year ago

basvijfwinkel commented 2 years ago

I added a calibration feature to your library. With this feature it is possible to use display coordinates for the touch screen as well. If you touch a pixel drawn at x=30,y=120 by a tft display library, the touch screen library will also return x=30,y=120 . The feature is an addition and does not introduce any breaking changes. I tested the feature with the Arduino IDE as I only have Arduino boards at hand.

I modified a calibration program for another touch screen controller This calibration program can be used to generate and test the calibration settings for this library. I updated README.md with information on how to use the calibrated coordinates feature.