{"id":13613096,"url":"https://github.com/mcauser/micropython-mpr121","last_synced_at":"2026-04-01T20:28:44.232Z","repository":{"id":150620687,"uuid":"125876707","full_name":"mcauser/micropython-mpr121","owner":"mcauser","description":"MicroPython driver for MPR121 capacitive touch keypads and breakout boards","archived":false,"fork":false,"pushed_at":"2020-02-14T05:28:27.000Z","size":970,"stargazers_count":18,"open_issues_count":0,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-28T05:51:10.891Z","etag":null,"topics":["capacitive-touch-sensor","micropython","mpr121","stm32f4"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcauser.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-03-19T15:07:43.000Z","updated_at":"2025-04-02T13:18:14.000Z","dependencies_parsed_at":"2023-05-06T09:32:20.261Z","dependency_job_id":null,"html_url":"https://github.com/mcauser/micropython-mpr121","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mcauser/micropython-mpr121","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-mpr121","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-mpr121/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-mpr121/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-mpr121/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcauser","download_url":"https://codeload.github.com/mcauser/micropython-mpr121/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcauser%2Fmicropython-mpr121/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["capacitive-touch-sensor","micropython","mpr121","stm32f4"],"created_at":"2024-08-01T20:00:39.661Z","updated_at":"2026-04-01T20:28:44.191Z","avatar_url":"https://github.com/mcauser.png","language":"Python","readme":"# MicroPython MPR121\n\nMicroPython driver for MPR121 capacitive touch keypads and breakout boards.\n\n![demo](docs/demo.jpg)\n\n![demo](docs/demo2.jpg)\n\nCompatible with:\n* [SparkFun Capacitive Touch Keypad - MPR121](https://www.sparkfun.com/products/12017) (discontinued)\n* [MPR121 Capacitive Touch Keypad](https://www.aliexpress.com/item/MPR121-capacitive-touch-sensor-module-sensor-keys-keyboard-keys-for-arduino/32810655083.html)\n* [MPR121 Capacitive Touch Breakout Board](https://www.aliexpress.com/item/MPR121-Breakout-V12-Capacitive-Touch-Sensor-Controller-Module-I2C-keyboard/32820571887.html)\n\nThese boards use 3.3V logic, so you would want to use a logic level converter with this for 5V systems.\n\n## Examples\n\nCopy the file to your device, using ampy, webrepl or compiling and deploying. eg.\n\n```bash\n$ ampy put mpr121.py\n```\n\n**Basic usage**\n\n```python\nfrom machine import Pin, I2C\nimport mpr121\nimport time\n\ni2c = I2C(scl=Pin(5), sda=Pin(4))\nmpr = mpr121.MPR121(i2c, 0x5A)\n\nwhile True:\n\tprint(mpr.touched())\n\ttime.sleep_ms(100)\n```\n\nFor more detailed examples, see [/examples](/examples)\n\n## Parts\n\n* [MPR121 Capacitive Touch Keypad](https://www.aliexpress.com/item/MPR121-capacitive-touch-sensor-module-sensor-keys-keyboard-keys-for-arduino/32810655083.html) $2.88 AUD\n* [Female-Female Dupont wires](https://www.aliexpress.com/item/10pcs-10cm-2-54mm-1p-1p-Pin-Male-to-Male-Color-Breadboard-Cable-Jump-Wire-Jumper/32636873838.html) $0.64 AUD\n* [VCC-GND STM32F407VET6 mini](https://www.aliexpress.com/item/STM32F407VET6-Mini-version-of-the-core-board-STM32-minimum-system-version/32709285751.html) $15.47 AUD\n* [TinyPICO](https://www.tinypico.com/) $20.00 USD\n* [Wemos D1 Mini](https://www.aliexpress.com/item/32529101036.html) $5.20 AUD\n\n## Connections\n\n### VCC GND STM32F407VET6 Mini\n\n```python\nfrom machine import I2C\nimport mpr121\ni2c = I2C(3)\nmpr = mpr121.MPR121(i2c, 0x5A)\n```\n\nMPR121 | STM32F407VET6\n------ | -------------\nVCC    | 3V3 (or 5V)\nIRQ    | D3 (optional)\nSCL    | A8 (SCL)\nSDA    | C9 (SDA)\nGND    | GND\n\n* I2C(1) SCL=B6, SDA=B7\n* I2C(2) SCL=B10, SDA=B11\n* I2C(3) SCL=A8, SDA=C9\n\n### TinyPICO (ESP32)\n\n```python\nfrom machine import Pin, I2C\nimport mpr121\ni2c = I2C(scl=Pin(22), sda=Pin(21))\nmpr = mpr121.MPR121(i2c, 0x5A)\n```\n\nMPR121 | TinyPICO ESP32\n------ | -------------\nVCC    | 3V3\nIRQ    | GPIO32 (optional)\nSCL    | GPIO22 (SCL)\nSDA    | GPIO21 (SDA)\nGND    | GND\n\n### Wemos D1 Mini (ESP8266)\n\n```python\nfrom machine import Pin, I2C\nimport mpr121\ni2c = I2C(scl=Pin(5), sda=Pin(4))\nmpr = mpr121.MPR121(i2c, 0x5A)\n```\n\nMPR121 | D1 Mini ESP8266\n------ | -------------\nVCC    | 3V3\nIRQ    | D3 (optional)\nSCL    | D1 GPIO5 (SCL)\nSDA    | D3 GPIO4 (SDA)\nGND    | GND\n\n## Links\n\n* [micropython.org](http://micropython.org)\n* [MPR121 datasheet](http://micropython.org/resources/datasheets/MPR121.pdf)\n* [MPR121 product page](https://www.nxp.com/products/no-longer-manufactured/proximity-capacitive-touch-sensor-controller:MPR121)\n* [Adafruit Ampy](https://learn.adafruit.com/micropython-basics-load-files-and-run-code/install-ampy)\n\n## License\n\nLicensed under the [MIT License](http://opensource.org/licenses/MIT).\n\nCopyright (c) 2018 Mike Causer\n","funding_links":[],"categories":["Libraries","精选驱动库"],"sub_categories":["Sensors","传感器"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcauser%2Fmicropython-mpr121","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcauser%2Fmicropython-mpr121","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcauser%2Fmicropython-mpr121/lists"}