Consequences of a power failure

Quick question, folks:

If I have a Particle Electron plugged into an NCD relay board. Power was lost last night for a while. Since a backup battery is connected to the Electron, my app continued to run. But the NCD board, of course, was dead. Under these circumstances, what value will be returned when ‘controller.readInputStatus’ is called? I am trying to understand some entries that were posted to a log during the outage.


Since the MCP23008 lost power it would be powered back up again but not initialized by the library running on the Electron. By default all GPIO lines on the MCP23008 are set to inputs including those connected to the relays. The library does not have handling for re initializing the MCP23008 as it was assumed that the processor would loose power any time the MCP23008 lost power. There is however a boolean on the MCP23008 library which the application can watch which is .initialized. If that returns false then it can be assumed that the MCP23008 chip needs to have init ran again.