Skip to content

Commit 5fe8ef1

Browse files
author
funnygeeker
committed
update 2.1.0 beta.1
1 parent 6486918 commit 5fe8ef1

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed

README.ZH-CN.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@
3030
import time
3131
import framebuf
3232
from machine import SPI, Pin
33-
from drivers import st7735_buf
34-
from libs.easydisplay import EasyDisplay
33+
from driver import st7735_buf
34+
from lib.easydisplay import EasyDisplay
3535

36-
# ESP32C3 & ST7735
37-
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(19), mosi=Pin(18))
38-
dp = st7735_buf.ST7735(width=160, height=128, spi=spi, cs=0, dc=1, rst=11, rotation=1)
39-
ed = EasyDisplay(display=dp, font="/text_lite_16px_2311.v3.bmf", show=True, color=0xFFFF, clear=True,
40-
color_type=framebuf.RGB565, text_half_char=True, text_auto_wrap=True)
36+
# ESP32S3 & ST7735
37+
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
38+
dp = st7735_buf.ST7735(width=128, height=128, spi=spi, cs=14, dc=15, res=16, rotate=1, bl=13, invert=False, rgb=False)
39+
ed = EasyDisplay(display=dp, font="/text_lite_16px_2312.v3.bmf", show=True, color=0xFFFF, clear=True,
40+
color_type="RGB565")
4141

4242
ed.bmp("/img/test.bmp", 0, 0)
4343
time.sleep(3)
44-
ed.pbm("/img/test.pbm", 0, 0, color_type=framebuf.MONO_HLSB)
44+
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
4545
time.sleep(3)
4646
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)
4747

48-
49-
# 更多高级使用方式详见源码注释:/libs/easydisplay.py
48+
# 更多高级使用方式详见源码注释:/lib/easydisplay.py
49+
# For more advanced usage, please refer to the source code comments: /lib/easydisplay.py
5050
```
5151

5252
### 特别致谢

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,26 +25,27 @@ For images in the `dat` format, make sure that they do not exceed the screen dis
2525

2626
### Example Code
2727
```python
28-
# This is an example of usage
28+
# 这是一个使用示例 This is an example of usage
2929
import time
3030
import framebuf
3131
from machine import SPI, Pin
32-
from drivers import st7735_buf
33-
from libs.easydisplay import EasyDisplay
32+
from driver import st7735_buf
33+
from lib.easydisplay import EasyDisplay
3434

35-
# ESP32C3 & ST7735
36-
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(19), mosi=Pin(18))
37-
dp = st7735_buf.ST7735(width=160, height=128, spi=spi, cs=0, dc=1, rst=11, rotation=1)
38-
ed = EasyDisplay(display=dp, font="/text_lite_16px_2311.v3.bmf", show=True, color=0xFFFF, clear=True,
39-
color_type=framebuf.RGB565, auto_wrap=True)
35+
# ESP32S3 & ST7735
36+
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(18), mosi=Pin(17))
37+
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")
4040

4141
ed.bmp("/img/test.bmp", 0, 0)
4242
time.sleep(3)
43-
ed.pbm("/img/test.pbm", 0, 0, color_type=framebuf.MONO_HLSB)
43+
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
4444
time.sleep(3)
4545
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)
4646

47-
# For more advanced usage, please refer to the source code comments: /libs/easydisplay.py
47+
# 更多高级使用方式详见源码注释:/lib/easydisplay.py
48+
# For more advanced usage, please refer to the source code comments: /lib/easydisplay.py
4849
```
4950

5051
### Special Thanks

0 commit comments

Comments
 (0)