shaoziyang wrote: ↑Fri Feb 21, 2020 8:11 amI have modify the LCD1602 drive, add autoaddress() function add print() function.
https://github.com/micropython-Chinese- ... 2C_LCD1602
Code: Select all
from machine import I2C, Pin from mp_i2c_lcd1602 import LCD1602 from time import sleep_ms i2c = I2C(1, sda=Pin(9), scl=Pin(10)) LCD = LCD1602(i2c) LCD.puts("I2C LCD1602")
Code: Select all
LCD = LCD1602(i2c)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "mp_i2c_lcd1602.py", line 20, in __init__
File "mp_i2c_lcd1602.py", line 61, in autoaddr
Exception: I2C address detect error!