BareConductive / mpr121

Bare Conductive MPR121 Arduino Library
MIT License
83 stars 39 forks source link

How to know the CDC and CDT values for the electrodes #17

Closed Gbouna closed 3 years ago

Gbouna commented 4 years ago

Thank you for your tutorials and for this library, it has really been helpful for me.

However I have a question. I have read through the examples and the source code of the library, and this was not very clear to me and it is important in my application.

Please I will like to know the charge discharge current (CDC) for the electrodes, also the charge discharge time (CDT). I understand from the source code the CDC is auto set, is there a way I can have this values displayed? Same also for CDT, is there a way I can display the values?

stefandz commented 3 years ago

Hi

Sorry for not seeing and responding to this sooner. You can get these values by reading the appropriate registers from the MPR121 - for example MPR121.getRegister( MPR121_CDC0 ) will give you the value of the CDC register for E0, MPR121.getRegister( MPR121_CDT0 ). In order to convert the values of these registers to SI units, you'll need to check the MPR121 datasheet.