Driver for AXS5106 touch controller
This driver depends on:
Please ensure all dependencies are available on the CircuitPython filesystem. This is easily achieved by downloading the Adafruit library and driver bundle or individual libraries can be installed using circup.
Make sure that you have circup installed in your Python environment.
Install it with the following command if necessary:
pip3 install circupWith circup installed and your CircuitPython device connected use the
following command to install:
circup install axs5106Or the following command to update an existing version:
circup updateimport board
import digitalio
from axs5106 import AXS5106L
# Initialize I2C bus
i2c = board.I2C()
# Initialize reset pin
reset = digitalio.DigitalInOut(board.TOUCH_RST)
# Initialize the touch controller with rotation and screen dimensions
# rotation=4 is 90° clockwise, adjust based on your display orientation
touch = AXS5106L(i2c, reset_pin=reset, rotation=4, dimensions=(320, 240))
# Main loop
while True:
# Check if screen is being touched
if touch.touched:
# Get all touch points (supports up to 5 simultaneous touches)
points = touch.touches
for point in points:
print(f"Touch {point['id']}: X={point['x']}, Y={point['y']}")API documentation for this library can be found on Read the Docs.
For information on building library documentation, please check out this guide.
Contributions are welcome! Please read our Code of Conduct before contributing to help this project stay welcoming.