SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By Ace0Spades
#184698
I'm overlooking something about MPR121 sensitivity. Working through the data sheet:

Running:

foo.writeRegister (0x5E, 0x00); //MPR121-Stop
foo.setThresholds (0, 2); //Maximum sensitivity
foo.cap.writeRegister (0x5E, 0XC5); //MPR121 start sensors 0-4 and Prox sensor

I would expect any capacitance change to trigger a touch. What does 0 mean in this context? Because I see in my debugging output the capacitance is varying 0-15% with NO touch condition indicated, or raw terms 0-19 cap. Stronger cap drop works fine, but I need the increased sensitivity. Do I need to turn off other features of the chip (filters, perhaps?)

Regards,
Ace
By Ace0Spades
#184752
I noticed that when I do this:

// AFE config
cap.writeRegister(ELE_CFG, 0x00); // Stop the touch momentarily
//uint8_t afeConfig = mpr121Read(AFE_CFG);
cap.writeRegister(0x45, 2);
cap.writeRegister(ELE_CFG, 0x0C); //Restart all electrodes

and then readRegister8(0x45) -- it does not reflect the value just written to it, it says instead "12".

Does that help? Seems like it is simply not taking my configuration changes...