Maplin's Touch LCD Shield for Arduino
I've been playing around with Maplin's Touch LCD Shield. It's not a bad device (it does seem to be a little slow, but I suspect that's mostly down to the library being used to drive it. That said, I did take a while to get it working since there's not a lot of documentation for it and I notice that I'm not the only one who had problems. So partially as a reminder to myself (and partially to make this visible to search engines) there's what I had to do.
- Download the correct library from linkshield's wiki. I eventually downloaded the v2 library.
- Copy the example program (again from the wiki).
- Fix up the compile errors in that example program - I guess the library was updated AFTER the example:
- Remove the declaration of TS_MINX, TS_MAXX, TS_MINY, TS_MAXY (the library has these as #define's and the compiler gets quite confused.)
- Changed the test
p.z > ts.pressureThreshold
tots.isTouching()
(The library doesn't have apressThreshold
field and the point class doesn't have az
field. On the other hand, the library does have theisTouching
method!) - Changed the
initTouchScreenParameters
method to initialise a touchscreen viaTouchScreen(XP, YP, XM, YM)
and deleted the setting of TS_MINX, TS_MAXX, TS_MINY, TS_MAXY (again the compiler gets quite confused).
I was then able to run the demo, although the touch output seemed to be completely reversed, so I edited my library header file to switch the values of TS_MIN* with TS_MAX*. This seemed to fix the problem.
I've, for the time being at least, used it to act as a monitor for my Thinkpad that runs my linux server (that is, I got the linux server to talk to it!)