Hi all. I'm new to Arduino, so bear with me.
I bought the SainSmart 2.8" TFT touch screen with the Due shield for my SainSmart Due clone.
Using Henning Karlsen's UTFT I got the screen working (UTFT myGLCD(CTE28, 25, 26, 27, 28)) and uncommenting that Shield define in the hardware folder. I was able to run several demo programs and they drew on the screen just fine.
I then installed the UTOUCH library, and have been attempting to get touch data. Neither the calibration program nor the other examples register any touches. Everything is drawn just fine, just no touches are registered.
I initialized the UTOUCH with UTouch myTouch( 6, 5, 4, 3, 2);
Since I'm new to Arduino and didn't know any better way to debug this, I started inserting Serial.println() statements into the calibration code to see how far I was getting.
It was hanging in his waitForTouch() function in the while (myTouch.dataAvailable() == false) {} line.
I went into the UTouch.cpp file and added the following to UTouch::dataAvailable() right after the line avail = !(rbi(P_IRQ, B_IRQ);
static byte printCount = 0;
if (avail == true) {
Serial.print("X");
delay(50);
}
else {
Serial.print(".");
printCount++;
if (printCount == 80) Serial.println("");
printCount %= 80;
}
I could now watch in the serial monitor as page after page of the . character flew by with not a single X, despite touching the screen in numerous places with a stylus, my finger, or anything else.
Has anyone else gotten UTouch to work with this screen? Is it likely I've got a bad touchscreen, or (my gut feeling here) is this just a programming issue? Are there different pins I should be using in my UTouch initialization than the 6, 5, 4, 3, 2 Due default?
I didn't realize SainSmart were the bad guys in this drama until reading more on Henning Karlsen's site. I've also searched the forum archives here without finding anything that solved this. I did find comments by Henning calling the SainSmart product crappy, and that he has never and will never support it. So I know better than to ask him. If I'd known this in advance I would have bought my screen from another company.
Thanks for any help!