I2C on old Nano

@rickir206

The following test will verify that your NANO's I2C Logic is working alright (assuming UNO-Slave is healthy).

1. Connect your NANO and UNO as per following diagram (Fig-1).
I2cnano
Figure-1:

2. Upload the following sketch in NANO-Master.

#include<Wire.h>

void setup()
{
  Serial.begin(9600);
  Wire.begin();

  Wire.beginTransmission(0x21); //roll calling for the Slave
  byte busStatus = Wire.endTransmission();
  if (busStatus != 0x00)
  {
    Serial.println("I2C Bus communication problem...!");
    while (1);  //wait for ever
  }
  Serial.println("Slave found!");
}

void loop()
{
 
} 

3. Upload the following sketch in UNO-Slave.

#include<Wire.h>

void setup()
{
  Serial.begin(9600);
  Wire.begin(0x21);
}

void loop()
{
  
}

4. Check that the Serial Monitor of NANO-Master shows some diagnostic message.