Skip to content

Commit dd0030a

Browse files
improve useage instructions
1 parent 8940ef9 commit dd0030a

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

examples/touch_calibrator_stmpe610.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# SPDX-License-Identifier: MIT
33

44
"""
5-
touch_calibrator_stmpe610.py 2022-01-20 v1.1
5+
touch_calibrator_stmpe610.py 2022-01-21 v1.1
66
77
Author(s): CedarGroveMakerStudios
88
@@ -15,6 +15,10 @@
1515
tuple can be copied and pasted into the calling code's touchscreen
1616
instantiation statement.
1717
18+
NOTE: When instantiating the STMPE610 controller, enter the 0-degree display
19+
rotation raw touch calibration value regardless of screen rotation value.
20+
The controller code will automatically adjust the calibration as needed.
21+
1822
DISPLAY_ROTATION: Display rotation value in degrees. Only values of
1923
None, 0, 90, 180, and 270 degrees are accepted. Defaults to None, the
2024
previous orientation of the display.
@@ -42,11 +46,14 @@
4246
import adafruit_stmpe610
4347

4448
# Operational parameters:
45-
DISPLAY_ROTATION = 0 # Specify 0, 90, 180, or 270 degrees
49+
# Specify 0, 90, 180, or 270 degrees;
50+
# use 0 for instantiation calibration tuple.
51+
DISPLAY_ROTATION = 0
4652
REPL_ONLY = False # True to disable graphics
4753
RAW_DATA = True # Use touchscreen raw values; False to use display coordinates
4854

49-
# Previously measured raw calibration tuple for display coordinate mode (RAW_DATA = False):
55+
# Previously measured raw calibration tuple for
56+
# display coordinate mode (RAW_DATA = False):
5057
CALIBRATION = ((357, 3812), (390, 3555))
5158

5259
# A collection of colors used for graphic objects

0 commit comments

Comments
 (0)