Code: Select all
#include "TouchScreen.h"
#define Yp A4 // must be an analog pin, use "An" notation!
#define Xn A5 // must be an analog pin, use "An" notation!
#define Yn 14 // can be a digital pin
#define Xp 27 // can be a digital pin
TouchScreen ts = TouchScreen(Xp, Yp, Xn, Yn, 300);
Second possibility was here...
Code: Select all
void loop() {
TSPoint p = ts.getPoint();
if (p.z > ts.pressureThreshhold) {
//Do something.
}
}
Code: Select all
void loop() {
TSPoint p = ts.getPoint();
if (p.z != 0) {
//Do something.
}
}
I'm trying to determine if it's there's a coding solution or we're just confronting a limitation of the touchscreen device itself.