networking

Is it possible to network several arduino together without the need for extra shields & a router? Something like... using pins 2 through 4 to set up a daisy chain of devices, each with their own address.

If it is possible I'd love to know how.

Thanks!

i2c is a good candidate I think.

I2C for short distances only.

For longer distances an RS485 bus is one option, but it requires a chip to convert the Arduinos serial signal to RS485 signals. This chip is cheap, and fairly easy to implement.

As MikMo pointed out, I2C is only meant for short distance communication. The distance is largely bound by the line capacitance (up to 400pf) which, depending on the wire you use, is roughly 10 to 20 feet.

That said, it could be useful depending on how long the connection needs to be. RS485 can support a distance up to 40,000 feet so it might be an overkill.

In between I2C and RS485 you have transeivers like CAN and LIN and even using LM393 comparators works well.

If you multi-drop several chips you'll have to come up with a protocol, either master/slave or everyone has to detect bus clashes and retry, but what of one chip hogs the system? etc.

If you "daisy chain" you can use a token passing system whereby every chip reads the data and passes it along to the next chip with it's data added to the end, like the HDLC protocol. Daisy chaining has one flaw in that a single break on the line kills the whole network.

FWIW I'm designing a protocol for just this purpose, I'm not actively plugging it yet because it's nowhere near ready but you can have a look at http://www.bus-net.net