Just correcting the last "if" with the correct :
if (p.z >= MINPRESSURE && p.z < MAXPRESSURE) {
It works also for non-pressure readings, BUT when we touch the panel the library returns the right pressure values mixed to pressure "0" readings even if the touch pad is continuously pressed.
Just correcting the last "if" with the correct :
if (p.z >= MINPRESSURE && p.z < MAXPRESSURE) {
It works also for non-pressure readings, BUT when we touch the panel the library returns the right pressure values mixed to pressure "0" readings even if the touch pad is continuously pressed.