OSError: [Errno 5] EIO

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Martanas
Posts: 11
Joined: Sat Dec 11, 2021 1:27 pm

Re: OSError: [Errno 5] EIO

Post by Martanas » Mon Dec 13, 2021 7:19 pm

Hey there, I changed resistors from 220 to 4.7k ohms but it the brackets in code output are still empty. And im just curious, what exactly that error (OSError: [Errno 5] EIO) means? Is it about the I2C or may i have another problem?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: OSError: [Errno 5] EIO

Post by Roberthh » Mon Dec 13, 2021 7:49 pm

(OSError: [Errno 5] EIO) is about I2C here. It means that code code cannot communicate with the I2C device. It is the line:

Code: Select all

self.i2c.writeto_mem(self.address, register, buffer)
which causes the error. Are you sure that all 4 wires are connected properly?

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: OSError: [Errno 5] EIO

Post by Roberthh » Mon Dec 13, 2021 7:55 pm

Which board do you use?

Edit: If you use a RP2 Pico: GPIO4 (SDA) is at Pin 6 of the board, GPIO5 (SCL) at Pin 7.

Martanas
Posts: 11
Joined: Sat Dec 11, 2021 1:27 pm

Re: OSError: [Errno 5] EIO

Post by Martanas » Tue Dec 14, 2021 1:47 pm

Well, im using raspberry pi pico.

Post Reply