We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c875a0 commit 3439047Copy full SHA for 3439047
examples/xrp_examples/ex01_touch_drive.py
@@ -106,10 +106,10 @@
106
107
# Loop to continuously read touch input and drive around
108
while True:
109
- # Read touch input
110
- x, y, touch_num = touch_screen.get_touch()
111
-
112
- if touch_num > 0:
+ # Check if there is touch input
+ if touch_screen.is_touched():
+ # Read touch coordinates
+ x, y = touch_screen.get_touch_xy()
113
# Check if the stop button was pressed
114
if (center_x - btn_stop_cx <= x <= center_x + btn_stop_cx and
115
center_y - btn_stop_cy <= y <= center_y + btn_stop_cy):
@@ -141,4 +141,4 @@
141
break
142
143
# Clear the display
144
-display.clear()
+display.splash()
0 commit comments