mattjlewis / diozero

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.
https://www.diozero.com
MIT License
261 stars 59 forks source link

Make MCP23017 stable and avoid blinking on reboot #162

Closed jozala closed 1 year ago

jozala commented 1 year ago

Solves the problem with randomly breaking I2C bus when rebooting device (caused by my previous PR and described here). At the same time, this change still allows to keep MCP23xxx pins up and avoid side effects on reboot like blinking lights.

I've been running this for two weeks on 5 devices without any problems. I've tried to reboot the devices multiple times to make sure it is not causing I2C bus stuck, like it was previously. I am sure this version is better than the one I've created in the previous PR and I hope it will be good enough in general :) .