Hi, I want to use 2 sensors mpr121 (no adafruit)
The arduino start correctly with all the 4 address when i wire correctly each address on the mpr121 board (add->gnd=0x5A, add->3.3=0x5B, add->scl=0x5C and add->sda=0x5D) but when i try to use it just the 0xA5 (GND) works correctly, on the other 3 address it doesnt have any sense or irq response.
I alredy cut the conexion on the board on the pads of the ADD and the 0x5A address just works when i manually wire the add to gnd.
On the code, all the address print "done" but just the 0xA5 address sense correctly.
#include <MPR121.h>
#include <Wire.h>
#define numElectrodes 12
void setup()
{
Serial.begin(9600);
while(!Serial); // only needed if you want serial feedback with the
// Arduino Leonardo or Bare Touch Board
// 0x5C is the MPR121 I2C address on the Bare Touch Board
if(!MPR121.begin(0x5B)){
Serial.println("error setting up MPR121");
switch(MPR121.getError()){
case NO_ERROR:
Serial.println("no error");
break;
case ADDRESS_UNKNOWN:
Serial.println("incorrect address");
break;
case READBACK_FAIL:
Serial.println("readback failure");
break;
case OVERCURRENT_FLAG:
Serial.println("overcurrent on REXT pin");
break;
case OUT_OF_RANGE:
Serial.println("electrode out of range");
break;
case NOT_INITED:
Serial.println("not initialised");
break;
default:
Serial.println("unknown error");
break;
}
while(1);
}
// pin 4 is the MPR121 interrupt on the Bare Touch Board
MPR121.setInterruptPin(4);
// this is the touch threshold - setting it low makes it more like a proximity trigger
// default value is 40 for touch
MPR121.setTouchThreshold(40);
// this is the release threshold - must ALWAYS be smaller than the touch threshold
// default value is 20 for touch
MPR121.setReleaseThreshold(20);
// initial data update
MPR121.updateTouchData();
Serial.println("done");
}
void loop()
{
if(MPR121.touchStatusChanged()){
MPR121.updateTouchData();
for(int i=0; i<numElectrodes; i++){
if(MPR121.isNewTouch(i)){
Serial.print("electrode ");
Serial.print(i, DEC);
Serial.println(" was just touched");
} else if(MPR121.isNewRelease(i)){
Serial.print("electrode ");
Serial.print(i, DEC);
Serial.println(" was just released");
}
}
}
}
I tried with the addafruit libbraries or with direct code and i get the same results.
I want to use the 3.3 for the 0x5B address and i'm wiring all on the protoboard.
I hope someone could help me and thanks in advance.