From 740efcb76392b43c91df1b247c295c1e48eb3d9e Mon Sep 17 00:00:00 2001 From: Gijs Noorlander Date: Wed, 10 Jan 2018 02:45:50 +0100 Subject: [PATCH] [Adafruit MPR121] Change deprecated name setThreshholds to setThresholds (#685) See #684 --- lib/Adafruit_MPR121/Adafruit_MPR121.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Adafruit_MPR121/Adafruit_MPR121.cpp b/lib/Adafruit_MPR121/Adafruit_MPR121.cpp index 0dd326fd31..6c1b6f22d6 100644 --- a/lib/Adafruit_MPR121/Adafruit_MPR121.cpp +++ b/lib/Adafruit_MPR121/Adafruit_MPR121.cpp @@ -1,16 +1,16 @@ -/*************************************************** +/*************************************************** This is a library for the MPR121 I2C 12-chan Capacitive Sensor Designed specifically to work with the MPR121 sensor from Adafruit ----> https://www.adafruit.com/products/1982 - These sensors use I2C to communicate, 2+ pins are required to + These sensors use I2C to communicate, 2+ pins are required to interface - Adafruit invests time and resources providing this open source code, - please support Adafruit and open-source hardware by purchasing + Adafruit invests time and resources providing this open source code, + please support Adafruit and open-source hardware by purchasing products from Adafruit! - Written by Limor Fried/Ladyada for Adafruit Industries. + Written by Limor Fried/Ladyada for Adafruit Industries. BSD license, all text above must be included in any redistribution ****************************************************/ @@ -21,26 +21,26 @@ Adafruit_MPR121::Adafruit_MPR121() { boolean Adafruit_MPR121::begin(uint8_t i2caddr) { Wire.begin(); - + _i2caddr = i2caddr; // soft reset writeRegister(MPR121_SOFTRESET, 0x63); delay(1); for (uint8_t i=0; i<0x7F; i++) { - // Serial.print("$"); Serial.print(i, HEX); + // Serial.print("$"); Serial.print(i, HEX); // Serial.print(": 0x"); Serial.println(readRegister8(i)); } - + writeRegister(MPR121_ECR, 0x0); uint8_t c = readRegister8(MPR121_CONFIG2); - + if (c != 0x24) return false; - setThreshholds(12, 6); + setThresholds(12, 6); writeRegister(MPR121_MHDR, 0x01); writeRegister(MPR121_NHDR, 0x01); writeRegister(MPR121_NCLR, 0x0E);