You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this library to connect an MCP23017 to a Raspberry Pi Pico. Randomly, every few minutes, the code crashes with the following error:
Traceback (most recent call last):
File "", line 17, in
File "mcp23017.py", line 263, in pin
File "mcp23017.py", line 144, in gpio
File "mcp23017.py", line 73, in _read
OSError: [Errno 5] EIO
I build a very simple circuit on a protoboard to debug the issue, right now its just a Raspberry Pi Pico and an MCP23017. The code I'm running is also as simple as possible:
from machine import I2C, Pin, RTC, ADC, SPI, UART
from mcp23017 import MCP23017
That reminds me when i have some bad soldering or shorts (i dont speak english, maybe that is not the word). Hope that is your case and not this look #17
Maybe you already fix that.
Hi,
I am using this library to connect an MCP23017 to a Raspberry Pi Pico. Randomly, every few minutes, the code crashes with the following error:
Traceback (most recent call last):
File "", line 17, in
File "mcp23017.py", line 263, in pin
File "mcp23017.py", line 144, in gpio
File "mcp23017.py", line 73, in _read
OSError: [Errno 5] EIO
I build a very simple circuit on a protoboard to debug the issue, right now its just a Raspberry Pi Pico and an MCP23017. The code I'm running is also as simple as possible:
from machine import I2C, Pin, RTC, ADC, SPI, UART
from mcp23017 import MCP23017
Set-up the I2C bus.
i2c_bus = I2C(1,
scl = Pin(19),
sda = Pin(18),
freq = 10_000)
Set-up the MCP23017 I/O expander.
IO_expander = MCP23017(i2c_bus, 0x20)
while (True):
button_UP = IO_expander.pin(0)
button_DOWN = IO_expander.pin(1)
button_MODE = IO_expander.pin(2)
button_PULSE = IO_expander.pin(3)
button_DIS_ARM = IO_expander.pin(4)
Could you please tell me what might be wrong here? The code works perfectly fine for a few minutes and then crashes at random times.
Thanks!
Best,
Diego
The text was updated successfully, but these errors were encountered: