Today I finished my What’s up (flight monitor) project by adding touch functionality to the TFT display. Touching a plane on the map will temporarily turn its icon red and display its flight details in a popup text area. After a couple of seconds, the map will be restored to full size again.
[Background conversation is live air traffic control from Amsterdam Airport Schiphol; video quality suffers from interference between the TFT display and my smartphone’s camera]
I had to use a STMPE160 touch screen controller because an esp8266 board like the Wemos only has one analog input, whereas my display needs two. Adafruit’s STMPE160 library seems to lack reliable control over the touch buffer, resulting in old touch point data being returned when a new touch event occurs. Luckily, I found a way to flush the buffer and make the sketch work.