Uno + Nano connected via I2C not working

Hi.

I have setup an Arduino Uno and a Nano to communicate with each other.

In theory, Uno is the Master and Nano works as the slave, so the USB cable is connect to Uno that provides power to Nano.

The I2C is connected to the 5V supplied by Uno with 1.5Kohm resistor.

The Nano has a QRD114 connect to it. If I plug the USB cable to Nano, it's running as expected, gathering data from QRD1114. You can see TX firing every 500ms.

So, to start the test, I only connect the Uno USB. Everythign lights up, but I can't see the TX flashing on Nano.

If I switch, and power Nano via USB and disconnect Uno, TX fires, but can't read a thing from Uno Serial output.

I have removed the QRD1114 from the equation, but still nothing good happens.

Any ideas?

The 1k5 pullup resistors are too low. Use 4k7 or 10k or nothing.
I don't understand why you want to see a TX led flashing when the communication is with I2C ?
Can you measure the 5V on the breadboard ?
Perhaps you have a cheap USB cable that is not able to power two Arduino boards.

Hi Peter,

In fact the fault was mine.

The flashing led is not really supposed to be working, unless when checking the QRD1114 code. So it was flashing because of Serial.print was there and uncommented.

All is well now. I still don't know if I can connect both Arduinos to USB at the same time, so only powering one at a time.

The code is working and the readings on the nano (slave) are being passed to the Uno (master).

Thanks for you time!

Ps. I had a flaky jumper cable to 5v as well.

alvarorodrigues:
... All is well now ...

That's very nice :stuck_out_tongue:

You can power both via USB at the same time. The Arduino Uno has a power selection circuit to select the power, and the Nano has protection diode for the 5V from the USB. You can even open two instances of the Arduino IDE, and have full control over the Uno and the Nano, each with a serial monitor at the same time.