BareConductive / mpr121

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

Two MPR121 Boards with different I2C Adresses #14

Closed flow1986 closed 4 years ago

flow1986 commented 4 years ago

Hi, is it possbile to Control 2 MPR121 Boards with different I2C Adresses? i need 24 Touch Inputs and therefor one MPR121 Board isn´t enough...

Thanks for your Reply!

Flo

stefandz commented 4 years ago

Hi Flo

It is possible to call MPR121.begin with various arguments, including the I2C address - i.e. MPR121.begin( 0x5A ). Take a look at MPR121.h in this library. By default, a single MPR121 object is instantiated. If you want to use more than one, you can declare another like this:

MPR121_type MPR121_number_2;
MPR121_number_2.begin( 0x5B);

I hope this helps

Stefan

flow1986 commented 4 years ago

that helped a lot! thanks