Expand My Device I/O and Rx/Tx using Arduino

Grumpy_Mike:
Not sure about timing. I would use the serial port to do all the communicating. You would send it commands structured in a specific way or protocol.

One common approach is to send the data in packets. A packet consists of a start byte followed by how many bytes are in the package, then the bytes and finally a end of package byte. This is suited to ASCII / text messages so the start and end bytes can be unprintable characters.

The packets could say / mean send this message to serial port 3, or set output 6 to the logic state of the input pin.

For an example look at the Firmata system that does the same sort of thing. The code is in the IDE.

Dear Grumpy_Mike,
Thanks for the information. I will look at the Firmata system to find out more. Thanks a lot.