[v7.0] Touch Controller Calibration?

Has the TpCal example been deprecated? I’ve seen it mentioned in some earlier posts.

I noticed the function static void xpt2046_corr(int16_t * x, int16_t * y) in the XPT2046.c file. From my understanding, it auto-calibrates the touch coordinates as you use it? Is this correct?

Is there any way to manually calibrate the touch controller? I used a screen before and it had a function to touch all 4 corners to calibrate it.

Hi @BFFonseca,

I haven’t done any work with touch screens in LVGL yet, but in the past with other platforms I made my own based on this code. It seems to work very well for the projects I used it in.

You will need this file and this file also…

I hope that is helpful.

Kind Regards,

Pete

Yes, it’s deprecated. However, all it did was printing the raw coordinates as you touch each corners ion order to get min/max x/y coordinates. These values are used in xpt2046_corr function too.