I am having problems with I2C.
To control my heating system I need approx 24 inputs and 24 outputs so I have made a PCB with 3 off MCP23017 lots of relays, optical isolators etc.
The MCP23017 has 16 IO pins and an IC2 interface.
My language of choice is node.js, this has an I2C module which works sometimes but gives "segmentation faults". A bit of googling shows I am not the only one with this problem.
The MCP23017 module in node works better but also gives segmentation faults (it uses the I2C module)
I have tried using the dev file interface but I cannot get ioctl to work with node.js
I have tried calling the IC2-TOOLS programs i2cget and i2cset, these work better but every 2000 calls or so the system crashes.
I am aware of the clock stretching bug in the RasPi. The MCP23017 does not do clock stretching.
I have made another system that uses Raspberry Pi/Node.js and a serial interface for control. This runs for weeks/months (so far) without problem.
My questions are:
Has anyone got I2C to work reliably in node.js? My system has to work for months making an I2C transaction every second or so.
Has anyone got I2C to work RELIABLY in anything else (eg python, c)?
I could redesign the pcb to use addressable latches ..... but I would rather not.
