vpaeder / pymcp2221

A python driver for the Microchip MCP2221/MCP2221A USB 2.0 to I2C/UART protocol converters
https://pypi.org/project/pymcp2221
MIT License
5 stars 2 forks source link

I2C - FailedCommandException('Command failed with code 1.') #13

Open commodoro opened 6 months ago

commodoro commented 6 months ago

Hi,

When I try to use the I2C with the Adafruit Board I get this exception:

FailedCommandException('Command failed with code 1.')

I can't write the GPIOs either but it doesn't give me any error. I used pip to install the package.

Thanks for the job and support!

vpaeder commented 6 months ago

According to the MCP2221A datasheet (Table 3-21), this answer means that the I2C bus is busy. I'd check what's the level of the SDA line. When not used it should be pulled up (I don't have one of these Adafruit breakout boards but I assume that the pull-up resistors on SCL and SDA lines are connected to 3V).