提交 4fe19a5d authored 作者: 唐睿骞's avatar 唐睿骞

更新示例

上级 5e85a0e8
import lcd1602
#from lcd1602 import LCD1602_RGB #LCD1602 RGB grove
from lcd1602 import LCD1602
from machine import I2C,Pin
from time import sleep
i2c = I2C(1,scl=Pin(7), sda=Pin(6), freq=400000)
d = lcd1602.Display(i2c, 2, 16)
d.set_rgb(255, 0, 0)
d = LCD1602.display(i2c, 2, 16)
#d = LCD1602_RGB.display(i2c, 2, 16)
#d.set_rgb(255, 0, 0)
sleep(1)
d.home()
d.print('Hello ')
d.set_rgb(0, 255, 0)
#d.set_rgb(0, 255, 0)
sleep(1)
d.setCursor(0, 1)
d.print('word ')
d.set_rgb(0, 0, 255)
\ No newline at end of file
#d.set_rgb(0, 0, 255)
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论