Skip to content

Commit 210fa72

Browse files
author
funnygeeker
committed
Update the usage sample
1 parent 5b28c6d commit 210fa72

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

README.ZH-CN.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,11 @@ from lib.easydisplay import EasyDisplay
3535
# ESP32S3 & ST7735
3636
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
3737
dp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)
38-
ed = EasyDisplay(display=dp, font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True,
39-
color_type="RGB565")
38+
ed = EasyDisplay(dp, "RGB565", font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True)
4039

4140
ed.bmp("/img/test.bmp", 0, 0)
4241
time.sleep(3)
43-
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
42+
ed.pbm("/img/test.pbm", 0, 0)
4443
time.sleep(3)
4544
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)
4645

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ from lib.easydisplay import EasyDisplay
3434
# ESP32S3 & ST7735
3535
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
3636
dp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)
37-
ed = EasyDisplay(display=dp, font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True,
38-
color_type="RGB565")
37+
ed = EasyDisplay(dp, "RGB565", font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True)
3938

4039
ed.bmp("/img/test.bmp", 0, 0)
4140
time.sleep(3)
42-
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
41+
ed.pbm("/img/test.pbm", 0, 0)
4342
time.sleep(3)
4443
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)
4544

main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
# ESP32S3 & ST7735
88
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
99
dp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)
10-
ed = EasyDisplay(display=dp, font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True,
11-
color_type="RGB565")
10+
ed = EasyDisplay(dp, "RGB565", font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True)
1211

1312
ed.bmp("/img/test.bmp", 0, 0)
1413
time.sleep(3)
15-
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
14+
ed.pbm("/img/test.pbm", 0, 0)
1615
time.sleep(3)
1716
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)
1817

0 commit comments

Comments
 (0)