I2C device addressing

There was a guy here a while back who posted a whole lot of boards connected together to do different things (they weren't identical). He used I2C, but I think he had a "assign me an address" button to work around the problem you are describing.

It does seem like the way to go, at least the easiest.

One of my code samples had both ends acting as a master. It's quite possible as such, I2C doesn't really have a master, more like "I'm master right now".
I didn't try too hard to get collisions. It wouldn't have been ... fun.

Well the I2C spec does say it's ok and handled by the standard. Although the proof will be in the pudding; the way it is actually handled in the Arduino I2C library is going to be critical.

I'm thinking a test setup with two boards to start with. The first setup is just to try a simple master-slave configuration. I'll use one of the digital pins to set that board as either master or slave. It'll be a simple: the master sends a byte, the slave echoes the byte, the master checks what it sent is what it received, repeat. This should flush out any wiring and other screw-ups I can/will do.

The next setup is to make them both masters and see if I can force a collision (somehow!) to occur. I think it's going to be difficult to come up with a messaging scheme that clearly shows a collision occurred and that the master/bus arbitration worked correctly. I don't think a simple send-and-echo test is going to be enough. Any help here would be greatly appreciated. In any case, I can kick it off and let it run for a day or so. That should be enough time to capture a collision.

John