Java Device I/O library that is portable across Single Board Computers and microcontrollers. Tested with Raspberry Pi, Odroid C2, BeagleBone Black, Next Thing CHIP, Asus Tinker Board and Arduinos / Pico. Supports GPIO, I2C, SPI as well as Serial communication. Also known to work with Udoo Quad.
I would like to avoid setting all pins of MCP23xxx on application start.
It is possible to set pins values to zero if needed, after initialisation. However, when all pins are set to off during initialisation, it may cause some side effects (like lights blinking) on application restart.
In my case, on application restart, lights are turned on (relays) and window shutters get open. I would like to avoid this behaviour by removing this code from initialisation.
Alternatively, I could prepare a separate constructor for MCP23017 to let the developer decide if he wants to turn off all pins on initialisation.
I would like to avoid setting all pins of MCP23xxx on application start. It is possible to set pins values to zero if needed, after initialisation. However, when all pins are set to off during initialisation, it may cause some side effects (like lights blinking) on application restart. In my case, on application restart, lights are turned on (relays) and window shutters get open. I would like to avoid this behaviour by removing this code from initialisation.
Alternatively, I could prepare a separate constructor for
MCP23017
to let the developer decide if he wants to turn off all pins on initialisation.What do you think?