I2C issue

I have a weird (to me) problem trying to get I2C working between two arduinos.

I'm using the master_reader and slave_sender example sketches on a Duemilonove and a Diecimila (tried both as master) They're connected only on a4 and a5

The behavior I'm seeing:
When both boards are powered via USB everything works as normal.
When the slave board is powered via 9v battery, it doesn't send anything
When the slave board is powered via a 9v wall wart, it sends gibberish: "ûÿÿÿÿ"

I've tried adding 1k pullup resistors to the data lines, but that hasn't had any effect.

Any ideas?

do the boards have a common ground? if they are both on usb they would have a ground through the computer, but not with the battery of wall wart.

Yep, dropping a wire from gnd to gnd made it work. I think I was too focused on the "Two Wire" part of TWI, that I forgot about proving a common ground.

Thanks!

Just wait till you get to One Wire which, Tah Dahh! requires two wires. :wink:

Signal Ground is pretty important, and for some reason gets left out of the naming. :o