@@ -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
2929import time
3030import framebuf
3131from 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 = 0x FFFF , 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 = 0x FFFF , clear = True ,
39+ color_type = " RGB565" )
4040
4141ed.bmp(" /img/test.bmp" , 0 , 0 )
4242time.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 " )
4444time.sleep(3 )
4545ed.text(" 你好,世界!\n Hello 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