@OP
I have been preaching and preaching that UART Port is called 'Port' because we cannot make parallel connection of more than one UART devices/sensors.
On the other hand, I2C Bus is a 'Bus' because we can make parallel connection of more than one I2C devices/sensors.
UART Port works upto 50' without conversion into RS232 logic; RS232 logic travels upto 200'.
I2C Bus operates only with 2'?
My recommendation is:
1. Connect AR0 (Arduino - 0) with AR1 using Sotware UART Port (SUART Port). You might need the hardware UART Port (UART Port) for debugging and sketch uploading purposes. It is simple to create SUART Port by including only 3 lines codes in the sketch.
2. Connect AR1, AR2, AR3, and AR4 using Software I2C Bus as you need the A4, A5 lines to acquire analog signals.
3. SUART Codes for AR0 (only for test purposes: untested)
#include<SoftwareSerial.h> //the header files comes with the IDE
SoftwareSerial SUART(2, 3); // DPin-2 works as SRX-pin; Dpin-3 as STX-pin
void setup()
{
Serial.begin(9600);
SUART.begin(9600);
}
void loop()
{
SUART.write(0x41); //send binary value 0x41 (ASCII of A) to AR1
delay(1000); //at 1sec interval
}
//----- Codes for AR1's SUART Port--------
#include<SoftwareSerial.h>
SoftwareSerial SUART(2, 3);
void setup()
{
Serial.begin(9600);
SUART.begin(9600);
}
void loop()
{
byte n = SUART.available();
if (n !=0)
{
byte x = SUART.read(); //x = 0x41
Serial.print((char)x); //character A should appaer on Serial Monitor of AR1
}
}
4. Soft I2C Codes for I2C Master AR1 (untested)
#include<SoftwareWire.h> //you have to get it from GitHub
SoftwareWire myWire(4, 5); //SSDA = DPin-4, SSCL = DPin-5
void setup()
{
Serial.begin(9600);
myWire.begin();
//----roll calling I2C Slave-1 (AR2) with address 0x23-------
myWire.beginTransmission(0x23); //slave-1Address); 0x23
byte busStatus = myWire.endTransmission();
if(busStatus !=0x00)
{
Serial.print("Slave is absent...!");
while(1); //wait for ever
}
}
void loop()
{
}
//--- Codes for Soft I2C Slave-1 (AR1) ------
#include<SoftwareWire.h>
SoftwareWire myWire(4, 5);
void setup()
{
Serial.begin(9600);
myWire.begin(0x23); //
}
void loop()
{
}
Hope that the post might be useful. Just for you information that the SUART and SOFTI2C work; but, the codes presented in this post are not tested. Any query/question will be welcomed.