We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recommend to add a function to enable autoconfig or to add an optional parameter to begin to enable autoconfig. The later being the preferred method.
Present method requires modification of code, which breaks updating the code/library to a new version in arduinoide or platformio library manager.
thank you.
The text was updated successfully, but these errors were encountered:
Suggest code changes:
.h file 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, boolean autoconfig = false);
.c file delete // uncomment to use autoconfig ! // #define AUTOCONFIG // use autoconfig (Yes it works pretty well!)
modify bool Adafruit_MPR121::begin(uint8_t i2caddr, TwoWire *theWire, uint8_t touchThreshold, uint8_t releaseThreshold, bool autoconfig) {
if (autoconfig) { writeRegister(MPR121_AUTOCONFIG0, 0x0B);
// correct values for Vdd = 3.3V writeRegister(MPR121_UPLIMIT, 200); // ((Vdd - 0.7)/Vdd) * 256 writeRegister(MPR121_TARGETLIMIT, 180); // UPLIMIT * 0.9 writeRegister(MPR121_LOWLIMIT, 130); // UPLIMIT * 0.65 }
Sorry, something went wrong.
No branches or pull requests
recommend to add a function to enable autoconfig or to add an optional parameter to begin to enable autoconfig. The later being the preferred method.
Present method requires modification of code, which breaks updating the code/library to a new version in arduinoide or platformio library manager.
thank you.
The text was updated successfully, but these errors were encountered: