Skip to content
MicroPython driver for MPR121 capacitive touch keypads and breakout boards
Branch: master
Clone or download
Latest commit 27d3f1c Aug 7, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Add the datasheet Mar 19, 2018
examples
LICENSE.txt
README.md Add license Aug 7, 2018
mpr121.py

README.md

MicroPython MPR121

MicroPython driver for MPR121 capacitive touch keypads and breakout boards.

demo

demo

Compatible with:

These boards use 3.3V logic, so you would want to use a logic level converter with this for 5V systems.

Examples

Copy the file to your device, using ampy, webrepl or compiling and deploying. eg.

$ ampy put mpr121.py

Basic usage

import mpr121

from machine import Pin
i2c = machine.I2C(3)

mpr = mpr121.MPR121(i2c, 0x5A)

print(mpr.touched())

For more detailed examples, see /examples

Parts

Connections

STM32F407VET6 MPR121 Capacitive Touch Keypad
3V3 (or 5V) VCC
D3 (any pin) IRQ
A8 (SPI3 SCL) SCL
C9 (SPI3 SDA) SDA
GND GND

Links

License

Licensed under the MIT License.

You can’t perform that action at this time.