Library for "extending" the capabilities of an Arduino with another?

Hi,

I could use a library that easily allows one to extend the capabilities of an Arduino with another (i.e get access to more pins)?

Possibly something that runs over IC2, and allows, at a high level, a master device to do something like:

Extension slave1 = Extension(5) ; // 5 would be the IC2 address of the slave device
slave1.pinMode(2, INPUT) ;
int value = slave1.digitalRead(2) ;

I can't find any library that does this simply, does one already exist?

If not I can contribute one. Does the interface suggested above seem reasonable?
I'm not an Arduino expert, but I have experience in C/C++ and contributing open-source software.

Thanks,

Patrick

Have a look at this Arduino to Arduino I2C Tutorial

...R