Skip to content

Instantly share code, notes, and snippets.

@seth10
Created February 23, 2017 13:55
Show Gist options
  • Save seth10/48884a69dd717e7ff1948afaaca8d19d to your computer and use it in GitHub Desktop.
Save seth10/48884a69dd717e7ff1948afaaca8d19d to your computer and use it in GitHub Desktop.
A simple PiStorms program to print the touchscreen coordinates on screen
from PiStorms import PiStorms
psm = PiStorms()
psm.screen.drawDisplay('Raw touchscreen vals')
psm.screen.termPrintAt(8, 'Press GO to quit.')
while not psm.isKeyPressed():
psm.screen.termPrintAt(0, 'X: %d' % psm.screen.TS_X())
psm.screen.termPrintAt(1, 'Y: %d' % psm.screen.TS_Y())
psm.screen.clearScreen()
psm.screen.termPrintAt(8, 'Done')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment