|
楼主 |
发表于 2020-7-3 20:33
|
显示全部楼层
11、Hello MixPY 变色字体
- #MicroPython动手做(37)——驱动LCD与图文显示
- #Hello MixPY 变色字体
- import time
- import mixno
- import lcd
- import image
- lcd.init(freq=1000000,color=0x0000)
- image = image.Image()
- while True:
- lcd.display(image.draw_string(6,30,'''Hello
- MixPY''',248,9,mono_space=0))
- lcd.display(image)
- time.sleep_ms(1000)
- lcd.clear(0)
- lcd.display(image.draw_string(6,30,'''Hello
- MixPY''',24630,9,mono_space=0))
- lcd.display(image)
- time.sleep_ms(1000)
- lcd.clear(0)
- lcd.display(image.draw_string(6,30,'''Hello
- MixPY''',7936,9,mono_space=0))
- lcd.display(image)
- time.sleep_ms(1000)
- lcd.clear(0)
复制代码
|
|