Closed prenticedavid closed 7 years ago
Same thing on a Mega2560, I modified this library to work with my LCD-Touch-Shield by modifying the "attachInterrupt"-Line within begin() in XPT2046_Touchscreen.cpp
to:
bool XPT2046_Touchscreen::begin()
{
SPI.begin();
pinMode(csPin, OUTPUT);
digitalWrite(csPin, HIGH);
if (255 != tirqPin) {
pinMode( tirqPin, INPUT );
attachInterrupt( digitalPinToInterrupt(tirqPin), isrPin, FALLING );
isrPinptr = this;
}
return true;
}
And now it works like a charm :) Thank you for this library 👍
If you specify an IRQ pin, on a Uno the ISR() only gets attached if you use digitalPinToInterrupt(tirqPin)
David.