22 #ifndef ADAFRUIT_MPR121_H 23 #define ADAFRUIT_MPR121_H 26 #include <Adafruit_BusIO_Register.h> 27 #include <Adafruit_I2CDevice.h> 30 #define MPR121_I2CADDR_DEFAULT 0x5A 31 #define MPR121_TOUCH_THRESHOLD_DEFAULT 12 32 #define MPR121_RELEASE_THRESHOLD_DEFAULT 6 38 MPR121_TOUCHSTATUS_L = 0x00,
39 MPR121_TOUCHSTATUS_H = 0x01,
40 MPR121_FILTDATA_0L = 0x04,
41 MPR121_FILTDATA_0H = 0x05,
42 MPR121_BASELINE_0 = 0x1E,
55 MPR121_TOUCHTH_0 = 0x41,
56 MPR121_RELEASETH_0 = 0x42,
57 MPR121_DEBOUNCE = 0x5B,
58 MPR121_CONFIG1 = 0x5C,
59 MPR121_CONFIG2 = 0x5D,
60 MPR121_CHARGECURR_0 = 0x5F,
61 MPR121_CHARGETIME_1 = 0x6C,
63 MPR121_AUTOCONFIG0 = 0x7B,
64 MPR121_AUTOCONFIG1 = 0x7C,
65 MPR121_UPLIMIT = 0x7D,
66 MPR121_LOWLIMIT = 0x7E,
67 MPR121_TARGETLIMIT = 0x7F,
69 MPR121_GPIODIR = 0x76,
71 MPR121_GPIOSET = 0x78,
72 MPR121_GPIOCLR = 0x79,
73 MPR121_GPIOTOGGLE = 0x7A,
75 MPR121_SOFTRESET = 0x80,
102 __attribute__((deprecated));
106 Adafruit_I2CDevice *i2c_dev = NULL;
uint16_t baselineData(uint8_t t)
Read the baseline value for the channel. The 3rd level filtered result is internally 10bit but only h...
Definition: Adafruit_MPR121.cpp:176
void setThreshholds(uint8_t touch, uint8_t release) __attribute__((deprecated))
DEPRECATED. Use Adafruit_MPR121::setThresholds(uint8_t touch, uint8_t release) instead.
Definition: Adafruit_MPR121.cpp:126
void setThresholds(uint8_t touch, uint8_t release)
Set the touch and release thresholds for all 13 channels on the device to the passed values...
Definition: Adafruit_MPR121.cpp:145
uint16_t touched(void)
Read the touch status of all 13 channels as bit values in a 12 bit integer.
Definition: Adafruit_MPR121.cpp:190
#define MPR121_RELEASE_THRESHOLD_DEFAULT
default relese threshold value
Definition: Adafruit_MPR121.h:32
uint16_t readRegister16(uint8_t reg)
Read the contents of a 16 bit device register.
Definition: Adafruit_MPR121.cpp:211
bool begin(uint8_t i2caddr=MPR121_I2CADDR_DEFAULT, TwoWire *theWire=&Wire, uint8_t touchThreshold=MPR121_TOUCH_THRESHOLD_DEFAULT, uint8_t releaseThreshold=MPR121_RELEASE_THRESHOLD_DEFAULT)
Begin an MPR121 object on a given I2C bus. This function resets the device and writes the default set...
Definition: Adafruit_MPR121.cpp:52
Class that stores state and functions for interacting with MPR121 proximity capacitive touch sensor c...
Definition: Adafruit_MPR121.h:84
uint16_t filteredData(uint8_t t)
Read the filtered data from channel t. The ADC raw data outputs run through 3 levels of digital filte...
Definition: Adafruit_MPR121.cpp:162
#define MPR121_I2CADDR_DEFAULT
default I2C address
Definition: Adafruit_MPR121.h:30
Adafruit_MPR121()
Default constructor.
Definition: Adafruit_MPR121.cpp:37
#define MPR121_TOUCH_THRESHOLD_DEFAULT
default touch threshold value
Definition: Adafruit_MPR121.h:31
uint8_t readRegister8(uint8_t reg)
Read the contents of an 8 bit device register.
Definition: Adafruit_MPR121.cpp:200
void writeRegister(uint8_t reg, uint8_t value)
Writes 8-bits to the specified destination register.
Definition: Adafruit_MPR121.cpp:223