MPR121 Class
- ID: mpr121
- Name: Digital Capacitive Touch Sensor Controller
- Other Names: Grove I2C Touch Sensor
- Category: touch
- Manufacturer: seeed
- Link: http://www.seeedstudio.com/wiki/Grove_-_I2C_Touch_Sensor
- Connection: i2c
- Kit: tsk
UPM module for the MPR121 touch sensor
Item Index
Methods
Properties
Methods
MPR121
-
bus
-
address
MPR121 constructor
Parameters:
-
bus
NumberI2C bus to use
-
address
Numberundefined
Returns:
configAN3944
()
Boolean
MPR121 destructor ~MPR121(); there is no need for the destructor Sets up a default configuration, based on Application Note 3944 (AN3944): http://cache.freescale.com/files/sensors/doc/app_note/AN3944.pdf
After configuration, the sensor is left in the run state.
Returns:
True if configuration is successful
readButtons
()
Reads button states in the m_buttonStates member variable. Also, sets the m_overCurrentFault variable if overcurrent is detected.
writeBytes
-
reg
-
buffer
-
len
Writes value(s) into registers
Parameters:
-
reg
NumberRegister location to start writing into
-
buffer
Uint8_t *Buffer for data storage
-
len
NumberNumber of bytes to write
Returns:
mraa::Result
readBytes
-
reg
-
buffer
-
len
Reads value(s) from registers
Parameters:
-
reg
NumberRegister location to start reading from
-
buffer
Uint8_t *Buffer for data storage
-
len
NumberNumber of bytes to read
Returns:
Properties
m_overCurrentFault
Boolean
Overcurrent detected