Write a module as such
control_module( Board#, Relay#, On/Off)
This module talks to mcp23017 via i2c and turns anyone of the 14 relays connected to the GPIO of the mcp23017, on or off. The Board# will have to be translates to the correct mcp23017 i2c address. The relays are numbered 1 to 14. On = 1, Off = 0.
The relays are latching, so a pulse is to be sent to them.
The board has been built but not tested yet. Programmer will have to have their own logic analyzer to see if the signals are going to the board and the output of the MCP23017 is going on/off as a driver to the transistor.
The transistor driving the relay circuit has been tested and is being used, along with MCP23017. so we know this works.
I am later interested in having this ported to Xmos chip as well. But that is a future project.