OSError: I2C bus error
Closed this issue · 8 comments
Here is the code I am trying to run:
import i2c_lcd
from machine import I2C
i2c = I2C(0, I2C.MASTER)
d = i2c_lcd.Display(i2c)
d.home()
d.write('Hello World')
Could you please try running the code below in the MicroPython REPL:
from machine import I2C
i2c = I2C(0, I2C.MASTER)
print(i2c.scan())
It's likely that the LCD screen that you are using, uses a different I2C Address. This command should show you what addresses are available on the I2C bus.
I used to get back a table with [4, 6, 8, 62, 98, 112]
but also sometimes an empty table.
Which LCD screen are you using - could you provide me a link to the specific device? It might be that the screen you are using has a different I2C address (62 == 0x3e, which is the expected address for the screen).
Can you also share your code and the OS Error that you get, please? This might help me determine where the error is occurring.
http://wiki.seeedstudio.com/Grove-LCD_RGB_Backlight/
JHD1313M3 - P150709
Another thought, are you sure that you are supplying 5V to the screen? You might need to use a logic level converter as the screen might be at 5V and the I2C bus at 3.3V
You are right it was because the VIN is -5V and not 5V.