Introduction
A CircuitPython module for the AT42QT2120 capacitive touch sensor IC, (mostly) compatible with Adafruit's MPR121 library.
Installing from PyPI
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install in a virtual environment in your current project:
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install circuitpython-at42qt2120
Usage Example
import busio
import board
from adafruit_bus_device import i2c_device
from at42qt2120 import AT42QT2120
i2c_bus = busio.I2C(board.SCL, board.SDA, frequency=100000)
at = AT42QT2120(i2c_bus)
print(at.touched_pins)
print([at[i].raw_value for i in range(12)])
Dependencies
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.