adafruit_mpr121

CircuitPython driver for the MPR121 capacitive touch breakout board.

See usage in the examples/simpletest.py file.

  • Author(s): Tony DiCola

Implementation Notes

Hardware:

Software and Dependencies:

class adafruit_mpr121.MPR121(i2c, address=90)[source]

Driver for the MPR121 capacitive touch breakout board.

baseline_data(pin)[source]

Return baseline data register value for the provided pin (0-11). Useful for debugging.

filtered_data(pin)[source]

Return filtered data register value for the provided pin (0-11). Useful for debugging.

is_touched(pin)[source]

Return True if the specified pin is being touched, otherwise returns False.

reset()[source]

Reset the MPR121 into a default state ready to detect touch inputs.

touched()[source]

Return touch state of all pins as a 12-bit value where each bit represents a pin, with a value of 1 being touched and 0 not being touched.

touched_pins

A tuple of touched state for all pins.

class adafruit_mpr121.MPR121_Channel(mpr121, channel)[source]

Helper class to represent a touch channel on the MPR121. Not meant to be used directly.

raw_value

The raw touch measurement.

release_threshold

The release threshold.

threshold

The touch threshold.

value

Whether the touch pad is being touched or not.