Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 1.23 KB

README.md

File metadata and controls

52 lines (39 loc) · 1.23 KB

pico-mpr121

A C library for using an MPR121-based touch sensor with the Raspberry Pi Pico

The MPR121 is a capacitive touch sensor controller with 12 electrodes. While NXP have now discontinued this sensor, touch sensor boards based on this chip are still available, e.g. Adafruit product 1982 and Seeed Studio Grove I2C Touch Sensor.

Wiring

MPR121 Pico
SDA SDA (e.g. pin 8)
SCL SCL (e.g. pin 9)
VDD 3V3(OUT)
GND GND

Software

  1. Configure CMakeLists.txt in your base project to include the path to the pico-mpr121 library. Add pico-mpr121 to the list of target libraries. E.g. if the pico-mpr121 library is located one directory above (../) the current one your CMakeLists.txt file should include
.
.
.
include(pico_sdk_import.cmake)
add_subdirectory(../pico-mpr121/lib mpr121)

target_link_libraries(touch
        pico_stdlib
        hardware_i2c
        pico-mpr121
)
.
.
.
  1. Use the library; see the examples directory.