Multiple I2C slave addresses?


Is there any way to assign multiple slave addresses to the Arduino? Basically, I need it to take the place of 4 slave devices in an existing system. I could use 4 Arduinos, and I will if I have to (most likely), but it would be nice if I could assign 4 addresses to one processor.

I'm pretty sure the answer to this is going to be that it can't be done, but I can't resist asking.

Thanks, Rusty

The I2C hardware in the ATmega8/168/328 only supports one slave address. So the only way it would be possible is to implement a software-only I2C function - not a trivial task.

There's a topic about a soft I2C library that may be applicable (or at least contibute the multi-slave capability request): Will there ever be a SoftI2C Library?

Thanks for the confirmation. I tried a test where I used multiple Wire.begin lines, with different addresses, and the last one is the one that’s used. Looks like I’ll just use 4 boards.