Simple test

Ensure your device works with this simple test.

examples/gt911_simpletest.py
 1# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
 2# SPDX-FileCopyrightText: Copyright (c) 2023 Robert Grizzell
 3#
 4# SPDX-License-Identifier: Unlicense
 5
 6import time
 7import board
 8import gt911
 9
10i2c = board.I2C()
11gt = gt911.GT911(i2c)
12
13while True:
14    for i, touch in enumerate(gt.touches):
15        x, y, a = touch
16        print(f"[{i+1}]({x},{y}) size:{a}")
17    time.sleep(1)