Main Content

Capacitance capabilities at the tip of your finger!

MPR121 is a 12-pin touch sensor, using capacitance capabilities of the IC.

There are 2 libraries for this IC, I personally prefer Using the bare conductive one.

https://github.com/BareConductive/mpr121

The chip has a trigger pin, that allow you to know that one of the pins was either touched or released, giving you great response time and giving you option to use an interrupt instead of scanning the state in the loop – like showed in the example.The only down side it that you have only one trigger pin for all the 12 IO pins of the IC.The I2C address can be set ADDR is the I2C address select pin. By default, this is pulled down to ground with a 100K resistor, for an I2C address of 0x5A. You can also connect it to the 3Vo pin for an address of 0x5B, the SDA pin for 0x5C or SCL for address 0x5DThis setting is for the adafruit boards, some of the clone boards haved ifferent I2C address sets and defaults. You can use the I2C scanner in case you do not know the one for your board.”

Link to article