Multiple mpr121

Hello Arduino comunity!
I have conected two mpr121 on a micro pro. IRQ, SCL and SDA are conected on the same spot for both of the boards, I change the address of one board conecting the 3.3v to SDA.
The both board seems to work but i just receive response from one.
I hope you guys can help me.

The code are in the attachments

neo_mpr121test.ino (11.8 KB)

mrultrapunch:
I change the address of one board conecting the 3.3v to SDA.

That doesn't sound right. Shouldn't that be the 'ADD/ADDR' pin?

mrultrapunch:
I change the address of one board conecting the 3.3v to SDA.

The code are in the attachments

That would short the data line.
Do you mean "connect the ADDR pin to 3.3volt"

Nobody likes attached code.
Read the "how to post" sticky.
Leo..

You have two modules but you only look at one IRQ pin?

void loop()
{
  // if mpr121 irq goes low, there have been
  // changes to the button states, so read the values
  if (digitalRead(IRQ_PIN) == LOW)
    readButtons();

  // this is needed to keep the sequencer
  // running. there are other methods for
  // start, stop, and pausing the steps
  seq.run();

  return;
}

Thanks for the quick response, and yes I wanted tho say that I connect the 3.3v to ADDR sorry!! :confused:

I connect both of the modules on the same IRQ pin. Is it that the problem? How can I do to define two IRQ pins?
I am newbie in programming, the code is from a adafruit tutorial that i modified...

The code have to many characters for post in that way...

// keep track of touched buttons
uint16_t lasttouched = 0;
uint16_t currtouched = 0;

void readButtons()
{
  // read current values
  currtouched = cap2.touched();
  currtouched = cap1.touched();

This might be the big problem. You get data for the second module and immediately overwrite it with the data from the first module. You can use a uint32_t variable to hold both sets of data:

// keep track of touched buttons
uint32_t lasttouched = 0;
uint32_t currtouched = 0;

void readButtons()
{
  // read current values
  currtouched = cap2.touched() & 0x0FFF;
  currtouched <<= 12;  // Move cap2 data left by 12 bits
  currtouched |= cap1.touched() & 0x0FFF;  // put the cap1 data in the lower 12 bits