Adafruit_MPR121_mod/Adafruit_MPR121_mod.cpp
void Adafruit_MPR121_mod::setThresholds(uint8_t touch, uint8_t release) {
  // first stop sensor to make changes
  // writeRegister(MPR121_ECR, 0x00);
  // set all thresholds (the same)
  for (uint8_t i = 0; i < 12; i++) {
    writeRegister(MPR121_TOUCHTH_0 + 2 * i, touch);
    writeRegister(MPR121_RELEASETH_0 + 2 * i, release);
  }
  // turn the sensor on again
  // writeRegister(MPR121_ECR, 0x8F);
}
/*!
 *  @brief      Set the touch and release thresholds for all 13 channels on the
 *              device to the passed values. The threshold is defined as a
 *              deviation value from the baseline value, so it remains constant
 * even baseline value changes. Typically the touch threshold is a little bigger
 * than the release threshold to touch debounce and hysteresis. For typical
 * touch application, the value can be in range 0x05~0x30 for example. The
 * setting of the threshold is depended on the actual application. For the
 * operation details and how to set the threshold refer to application note
 * AN3892 and MPR121 design guidelines.
 *  @param      touch
 *              the touch threshold value from 0 to 255.
 *  @param      release
 *              the release threshold from 0 to 255.
 */
@brief      Set the touch and release thresholds for all 13 channels on the
device to the passed values. The threshold is defined as a
deviation value from the baseline value, so it remains constant
even baseline value changes. Typically the touch threshold is a little bigger
than the release threshold to touch debounce and hysteresis. For typical
touch application, the value can be in range 0x05~0x30 for example. The
setting of the threshold is depended on the actual application. For the
operation details and how to set the threshold refer to application note
AN3892 and MPR121 design guidelines.
@param      touch
the touch threshold value from 0 to 255.
@param      release
the release threshold from 0 to 255.
@brief Set the touch and release thresholds for all 13 channels on the device to the passed values . The threshold is defined as a deviation value from the baseline value so it remains constant even baseline value changes . Typically the touch threshold is a little bigger than the release threshold to touch debounce and hysteresis . For typical touch application the value can be in range 0x05~0x30 for example . The setting of the threshold is depended on the actual application . For the operation details and how to set the threshold refer to application note AN3892 and MPR121 design guidelines . @param touch the touch threshold value from 0 to 255 . @param release the release threshold from 0 to 255 .
void Adafruit_MPR121_mod::setThresholds(uint8_t touch, uint8_t release) {
  for (uint8_t i = 0; i < 12; i++) {
    writeRegister(MPR121_TOUCHTH_0 + 2 * i, touch);
    writeRegister(MPR121_RELEASETH_0 + 2 * i, release);
  }
}
void Adafruit_MPR121_mod :: setThresholds ( uint8_t touch , uint8_t release ) { for ( uint8_t i = 0 ; i < 12 ; i ++ ) { writeRegister ( MPR121_TOUCHTH_0 + 2 * i , touch ) ; writeRegister ( MPR121_RELEASETH_0 + 2 * i , release ) ; } }
@brief      Set the touch and release thresholds for all 13 channels on the
              device to the passed values.
@brief Set the touch and release thresholds for all 13 channels on the device to the passed values .
// first stop sensor to make changes // writeRegister(MPR121_ECR, 0x00); // set all thresholds (the same) // turn the sensor on again // writeRegister(MPR121_ECR, 0x8F);