Thanks for this great mcp230xx library. This makes the handling of my MCP23017 much smoother. However I had to make some adjustments to make it work on my pyboard v1.1. On the pyboard the I2C class of the pyb package must be used (different to the I2C class of the machine package which is used on other controllers). For details on the differences see https://learn.adafruit.com/micropython-hardware-i2c-devices/i2c-master. They are both incompatible so I made the approach of passing an i2c object as parameter to the MCP class. The modifications I made provide a module that can be used either on the pyboard or on other boards. The drawback is that the functions signature changes. I made a PR with my changes if you would like to include them to make this module more universal.
Thanks for this great mcp230xx library. This makes the handling of my MCP23017 much smoother. However I had to make some adjustments to make it work on my pyboard v1.1. On the pyboard the I2C class of the
pyb
package must be used (different to the I2C class of themachine
package which is used on other controllers). For details on the differences see https://learn.adafruit.com/micropython-hardware-i2c-devices/i2c-master. They are both incompatible so I made the approach of passing ani2c
object as parameter to theMCP
class. The modifications I made provide a module that can be used either on the pyboard or on other boards. The drawback is that the functions signature changes. I made a PR with my changes if you would like to include them to make this module more universal.Kind Regards