# CircuitPython-AT42QT2120
[][readthedocs]
[][github-action]
[][ruff]
A CircuitPython module for the AT42QT2120 capacitive touch sensor IC, (mostly) compatible with Adafruit's MPR121 library.
This library's interface is designed after Adafruit's MPR121 module.
The ICs diverge in functionality, so we only include functions available on both chips.
To determine which functionality is required, I surveyed several consumers of the MPR121 library.
This includes three examples from Adafruit, and many of the projects "dependent" on their library on GitHub.
A full list of all the projects I surveyed and their usage of the MPR121 library can be found in [the Compatibility Audit][audit].
This audit should let us cover enough of the design to use an AT42QT2120 as a drop-in replacement for most users of the MPR121.
## Installing from PyPI
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally [from PyPI][pypi-at42qt2120].
To install in a virtual environment in your current project:
```shell
mkdir project-name && cd project-name
python3 -m venv .venv
source .venv/bin/activate
pip3 install circuitpython-at42qt2120
```
## Usage Example
```python
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)])
```
## Documentation
API documentation for this library can be found on [Read the Docs][readthedocs].
## Contributing
Contributions are welcome! Please read our [Code of Conduct][conduct]
before contributing to help this project stay welcoming.
[readthedocs]: https://at42qt2120.readthedocs.io/en/latest/
[github-action]: https://github.com/MikeCoats/CircuitPython_AT42QT2120/actions
[ruff]: https://github.com/astral-sh/ruff
[audit]: mkdocs/compatibility.md
[pypi-at42qt2120]: https://pypi.org/project/circuitpython-at42qt2120/
[readthedocs]: https://at42qt2120.readthedocs.io/
[conduct]: ./CODE_OF_CONDUCT.md
Raw data
{
"_id": null,
"home_page": null,
"name": "circuitpython-at42qt2120",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "adafruit, blinka, circuitpython, micropython, capacitive, touch, at42qt2120",
"author": null,
"author_email": "Mike Coats <i.am@mikecoats.com>",
"download_url": "https://files.pythonhosted.org/packages/2b/8d/dd0384cee33292a09a9ef32e84b4e7381d9ff64db035808630162b76a130/circuitpython_at42qt2120-1.0.0.tar.gz",
"platform": null,
"description": "# CircuitPython-AT42QT2120\n\n[][readthedocs]\n[][github-action]\n[][ruff]\n\nA CircuitPython module for the AT42QT2120 capacitive touch sensor IC, (mostly) compatible with Adafruit's MPR121 library.\n\nThis library's interface is designed after Adafruit's MPR121 module.\nThe ICs diverge in functionality, so we only include functions available on both chips.\nTo determine which functionality is required, I surveyed several consumers of the MPR121 library.\nThis includes three examples from Adafruit, and many of the projects \"dependent\" on their library on GitHub.\n\nA full list of all the projects I surveyed and their usage of the MPR121 library can be found in [the Compatibility Audit][audit].\nThis audit should let us cover enough of the design to use an AT42QT2120 as a drop-in replacement for most users of the MPR121.\n\n## Installing from PyPI\n\nOn supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally [from PyPI][pypi-at42qt2120].\nTo install in a virtual environment in your current project:\n\n```shell\nmkdir project-name && cd project-name\npython3 -m venv .venv\nsource .venv/bin/activate\npip3 install circuitpython-at42qt2120\n```\n\n## Usage Example\n\n```python\nimport busio\nimport board\nfrom adafruit_bus_device import i2c_device\n\nfrom at42qt2120 import AT42QT2120\n\ni2c_bus = busio.I2C(board.SCL, board.SDA, frequency=100000)\nat = AT42QT2120(i2c_bus)\n\nprint(at.touched_pins)\nprint([at[i].raw_value for i in range(12)])\n```\n\n## Documentation\n\nAPI documentation for this library can be found on [Read the Docs][readthedocs].\n\n## Contributing\n\nContributions are welcome! Please read our [Code of Conduct][conduct]\nbefore contributing to help this project stay welcoming.\n\n[readthedocs]: https://at42qt2120.readthedocs.io/en/latest/\n[github-action]: https://github.com/MikeCoats/CircuitPython_AT42QT2120/actions\n[ruff]: https://github.com/astral-sh/ruff\n[audit]: mkdocs/compatibility.md\n[pypi-at42qt2120]: https://pypi.org/project/circuitpython-at42qt2120/\n[readthedocs]: https://at42qt2120.readthedocs.io/\n[conduct]: ./CODE_OF_CONDUCT.md\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A CircuitPython module for the AT42QT2120 capacitive touch sensor IC, (mostly) compatible with Adafruit's MPR121 library.",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/MikeCoats/CircuitPython_AT42QT2120"
},
"split_keywords": [
"adafruit",
" blinka",
" circuitpython",
" micropython",
" capacitive",
" touch",
" at42qt2120"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5452ff17d0985a2cbd34e566f4c26838f590bd72645def5b3c8954487a4a8477",
"md5": "906ac20fcd3a98088f2eedcfb3a51b7a",
"sha256": "3f1b8caba28c195eca9b497fb9d1d45c9eae3e19888ac9882357683352c6e95a"
},
"downloads": -1,
"filename": "circuitpython_at42qt2120-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "906ac20fcd3a98088f2eedcfb3a51b7a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6146,
"upload_time": "2025-09-06T20:31:24",
"upload_time_iso_8601": "2025-09-06T20:31:24.345905Z",
"url": "https://files.pythonhosted.org/packages/54/52/ff17d0985a2cbd34e566f4c26838f590bd72645def5b3c8954487a4a8477/circuitpython_at42qt2120-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2b8ddd0384cee33292a09a9ef32e84b4e7381d9ff64db035808630162b76a130",
"md5": "79c55fac34e5af93440d91934bc649dd",
"sha256": "3f7e44f13957a0e5f012e78204f047a9d15cc3acede69b783caa33c56e49d385"
},
"downloads": -1,
"filename": "circuitpython_at42qt2120-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "79c55fac34e5af93440d91934bc649dd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21757,
"upload_time": "2025-09-06T20:31:25",
"upload_time_iso_8601": "2025-09-06T20:31:25.947646Z",
"url": "https://files.pythonhosted.org/packages/2b/8d/dd0384cee33292a09a9ef32e84b4e7381d9ff64db035808630162b76a130/circuitpython_at42qt2120-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-06 20:31:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MikeCoats",
"github_project": "CircuitPython_AT42QT2120",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "Adafruit-Blinka",
"specs": []
},
{
"name": "adafruit-circuitpython-busdevice",
"specs": []
}
],
"lcname": "circuitpython-at42qt2120"
}