|
楼主 |
发表于 2020-7-19 18:37
|
显示全部楼层
7、跳动变色的X字母
- #MicroPython动手做(40)——机器视觉之图像基础 2
- #跳动变色的X字母
- import time
- import mixno
- import lcd
- import image
- lcd.init(freq=15000000,color=0)
- image = image.Image()
- while True:
- lcd.display(image.draw_string(120,30,"X",248,20,mono_space=0))
- time.sleep_ms(1000)
- lcd.display(image.draw_string(120,30,"X",57351,20,mono_space=0))
- time.sleep_ms(1000)
- lcd.display(image.draw_string(120,30,"X",7936,20,mono_space=0))
- time.sleep_ms(1000)
- lcd.display(image.draw_string(120,30,"X",0,20,mono_space=0))
- time.sleep_ms(1000)
- lcd.display(image.draw_string(100,0,"X",248,28,mono_space=0))
- time.sleep_ms(1000)
- lcd.display(image.draw_string(100,0,"X",57351,28,mono_space=0))
- time.sleep_ms(1000)
- lcd.display(image.draw_string(100,0,"X",7936,28,mono_space=0))
- time.sleep_ms(1000)
- lcd.display(image.draw_string(100,0,"X",0,28,mono_space=0))
- time.sleep_ms(1000)
复制代码
|
|