Datasheet
Getting data from the touchscreen is fairly straight forward. Start by creating the touchscreen object with
Adafruit_STMPE610 ts = Adafruit_STMPE610(STMPE_CS);
We're using hardware SPI so the clock, mosi and miso pins are not defined here.
Then you can start the touchscreen with
ts.begin()
Check to make sure this returns a True value, which means the driver was found. If it wasn't, make sure you have the
Feather soldered right and the correct CS pin!
Now you can call
if (! ts.bufferEmpty())
to check if there's any data in the buffer. The touchscreen driver will store touchpoints at all times. When you're ready
to get the data, just check if there's any data in the buffer. If there is, you can call
TS_Point p = ts.getPoint();
The touch screen is made of a thin glass sheet, and its very fragile - a small crack or break will make the
entire touch screen unusable. Don't drop or roughly handle the TFT and be especially careful of the corners
and edges. When pressing on the touchscreen, sometimes people can use the tip of their fingers, or a
fingernail. If you don't find the touchscreen responds well to your fingers, you can use a rounded stylus which
will certainly work. Do not press harder and harder until the screen cracks!
© Adafruit Industries https://learn.adafruit.com/adafruit-2-4-tft-touch-screen-featherwing Page 18 of 23










