Created
February 23, 2017 13:55
-
-
Save seth10/48884a69dd717e7ff1948afaaca8d19d to your computer and use it in GitHub Desktop.
A simple PiStorms program to print the touchscreen coordinates on screen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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