The communication protocol is the same. You could use the code from ArduinoIHC. IHCInput to listen to input modules and IHCOutput to talk to output modules. I think the only problem is that the IHCInput class only listens to the first 8 bits since it is designed to emulate an output module with just 8 outputs. Change that to 16 bits and it should work as a controller. I'm trying to do the same thing as you and I have a working prototype for listening to my input modules and will start working on output modules next.