how can I read this button press?
#include <XPT2046_Touchscreen.h>
#include <SPI.h>
#define CS_PIN PB6
XPT2046_Touchscreen ts(CS_PIN);
void setup() {
Serial.begin(38400);
ts.begin();
ts.setRotation(1);
while (!Serial && (millis() <= 1000));
}
void loop() {
if (ts.touched()) {
TS_Point p = ts.getPoint();
Serial.print("Pressure = ");
Serial.print(p.z);
Serial.print(", x = ");
Serial.print(p.x);
Serial.print(", y = ");
Serial.print(p.y);
delay(30);
Serial.println();
}
}