microbit | LCD1602 |
---|---|
3V | VCC |
GND | GND |
P19/SCL | SCL |
P20/SDA | SDA |
LCD1602 | PCF8574A |
---|---|
RS | P0 |
RW | P1 |
E | P2 |
BackLight | P3 |
Dat | P4-P7 |
PCF8574 | PCF8574A |
---|---|
0x27 | 0x3F |
on()
turn on LCD
off()
turn off LCD
clear()
clear display
backlight(on)
0 turn of backlight
1 turn on backlight
char(ch, x, y)
show a character in given position
x, 0-15
y, 0-1
puts(s, x, y)
show a string in given position
x, 0-15
y, 0-1
copy mb_i2c_lcd1602.py to microbit using mu or copy file content to your python file first.
from mb_i2c_lcd1602 import *
l=LCD1620()
l.puts('Hello microbit!')
From microbit/micropython Chinese community.
www.micropython.org.cn