Skip to content

Commit

Permalink
update 2.1.0 beta.1
Browse files Browse the repository at this point in the history
  • Loading branch information
funnygeeker committed Jan 3, 2024
1 parent 6486918 commit 5fe8ef1
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
20 changes: 10 additions & 10 deletions README.ZH-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@
import time
import framebuf
from machine import SPI, Pin
from drivers import st7735_buf
from libs.easydisplay import EasyDisplay
from driver import st7735_buf
from lib.easydisplay import EasyDisplay

# ESP32C3 & ST7735
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(19), mosi=Pin(18))
dp = st7735_buf.ST7735(width=160, height=128, spi=spi, cs=0, dc=1, rst=11, rotation=1)
ed = EasyDisplay(display=dp, font="/text_lite_16px_2311.v3.bmf", show=True, color=0xFFFF, clear=True,
color_type=framebuf.RGB565, text_half_char=True, text_auto_wrap=True)
# 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.bmp("/img/test.bmp", 0, 0)
time.sleep(3)
ed.pbm("/img/test.pbm", 0, 0, color_type=framebuf.MONO_HLSB)
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
time.sleep(3)
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)


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

### 特别致谢
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,27 @@ For images in the `dat` format, make sure that they do not exceed the screen dis

### Example Code
```python
# This is an example of usage
# 这是一个使用示例 This is an example of usage
import time
import framebuf
from machine import SPI, Pin
from drivers import st7735_buf
from libs.easydisplay import EasyDisplay
from driver import st7735_buf
from lib.easydisplay import EasyDisplay

# ESP32C3 & ST7735
spi = SPI(1, baudrate=20000000, polarity=0, phase=0, sck=Pin(19), mosi=Pin(18))
dp = st7735_buf.ST7735(width=160, height=128, spi=spi, cs=0, dc=1, rst=11, rotation=1)
ed = EasyDisplay(display=dp, font="/text_lite_16px_2311.v3.bmf", show=True, color=0xFFFF, clear=True,
color_type=framebuf.RGB565, auto_wrap=True)
# 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.bmp("/img/test.bmp", 0, 0)
time.sleep(3)
ed.pbm("/img/test.pbm", 0, 0, color_type=framebuf.MONO_HLSB)
ed.pbm("/img/test.pbm", 0, 0, color_type="MONO")
time.sleep(3)
ed.text("你好,世界!\nHello World!\nこんにちは、世界!", 0, 0)

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

### Special Thanks
Expand Down

0 comments on commit 5fe8ef1

Please sign in to comment.