Skip to content

Commit

Permalink
Update the usage sample
Browse files Browse the repository at this point in the history
  • Loading branch information
funnygeeker committed Feb 18, 2024
1 parent 5b28c6d commit 210fa72
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
5 changes: 2 additions & 3 deletions README.ZH-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,11 @@ from lib.easydisplay import EasyDisplay
# ESP32S3 & ST7735
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
dp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)
ed = EasyDisplay(display=dp, font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True,
color_type="RGB565")
ed = EasyDisplay(dp, "RGB565", font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True)

ed.bmp("/img/test.bmp", 0, 0)
time.sleep(3)
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
ed.pbm("/img/test.pbm", 0, 0)
time.sleep(3)
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)

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

ed.bmp("/img/test.bmp", 0, 0)
time.sleep(3)
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
ed.pbm("/img/test.pbm", 0, 0)
time.sleep(3)
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)

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

ed.bmp("/img/test.bmp", 0, 0)
time.sleep(3)
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
ed.pbm("/img/test.pbm", 0, 0)
time.sleep(3)
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)

Expand Down

0 comments on commit 210fa72

Please sign in to comment.