楼主: 驴友花雕
|
[MP动手做] MicroPython动手做(37)——驱动LCD与图文显示 |
本帖最后由 驴友花雕 于 2020-7-3 20:20 编辑 MicroPython动手做(37)——驱动LCD与图文显示 五彩MixPY移动文本弹幕(实验视频) https://v.youku.com/v_show/id_XN ... oneSokuUgc_1.dtitle [media=x,500,375] https://v.youku.com/v_show/id_XN ... oneSokuUgc_1.dtitle[/media] |
8、随机色彩的“AI”雨 [mw_shl_code=python,false]#MicroPython动手做(37)——驱动LCD与图文显示 #随机色彩的“AI”雨 import time import random import mixno import lcd lcd.init(freq=15000000,color=0x0000) X = 0 while True: for i in range(224, 0, -16): for YYY in range(0, 20, 1): for Y in range(0, i, 1): lcd.draw_string(X,Y,"AI",(random.randint(0, 0XFFFF)),0X0000) time.sleep_ms(1) X += 16 if X >= 318: X = 0[/mw_shl_code] |
9、七彩屏幕循环变色 [mw_shl_code=python,false]#MicroPython动手做(37)——驱动LCD与图文显示 #七彩屏幕循环变色 import mixno import lcd while True: lcd.init(freq=40000,color=58935) lcd.init(freq=60000,color=7936) lcd.init(freq=80000,color=248) lcd.init(freq=100000,color=59135) lcd.init(freq=120000,color=14795) lcd.init(freq=140000,color=8443) lcd.init(freq=160000,color=32566)[/mw_shl_code] |
10、变色七彩字体 [mw_shl_code=python,false]#MicroPython动手做(37)——驱动LCD与图文显示 #变色七彩字体 import mixno import lcd import image lcd.init(freq=150000,color=0x0000) image = image.Image() while True: lcd.display(image.draw_string(30,60,"MixPY",248,12,mono_space=0)) lcd.display(image) lcd.display(image.draw_string(30,60,"MixPY",24630,12,mono_space=0)) lcd.display(image) lcd.display(image.draw_string(30,60,"MixPY",7936,12,mono_space=0)) lcd.display(image) lcd.display(image.draw_string(30,60,"MixPY",8443,12,mono_space=0)) lcd.display(image) lcd.display(image.draw_string(30,60,"MixPY",39369,12,mono_space=0)) lcd.display(image) lcd.display(image.draw_string(30,60,"MixPY",57599,12,mono_space=0)) lcd.display(image) lcd.display(image.draw_string(30,60,"MixPY",4912,12,mono_space=0)) lcd.display(image)[/mw_shl_code] |
11、Hello MixPY 变色字体 [mw_shl_code=python,false]#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)[/mw_shl_code] |
12、LCD红绿色呼吸屏幕 [mw_shl_code=python,false]#MicroPython动手做(37)——驱动LCD与图文显示 #LCD红绿色呼吸屏幕 import time import mixno import lcd lcd.init(freq=15000000,color=(0,0,0)) mylist = [0,0,0] while True: for i in range(0, 255, 1): mylist[0] = i mylist[1] = 0 mylist[2] = 0 lcd.clear(tuple(mylist)) time.sleep_ms(10) for i in range(255, 0, -1): mylist[0] = i mylist[1] = 0 mylist[2] = 0 lcd.clear(tuple(mylist)) time.sleep_ms(10)[/mw_shl_code] |
13、循环变色彩虹屏幕 [mw_shl_code=python,false]#MicroPython动手做(37)——驱动LCD与图文显示 #循环变色彩虹屏幕 import time import mixno import lcd lcd.init(freq=15000000,color=(0,0,0)) mylist = [0,0,0] while True: for i in range(0, 255, 1): mylist[0] = i mylist[1] = 255 - i mylist[2] = 0 lcd.clear(tuple(mylist)) time.sleep_ms(15) time.sleep_ms(300) for i in range(255, 0, -1): mylist[0] = i mylist[1] = 0 mylist[2] = 255 - i lcd.clear(tuple(mylist)) time.sleep_ms(15) time.sleep_ms(300) for i in range(0, 255, 1): mylist[0] = 0 mylist[1] = i mylist[2] = 255 - i lcd.clear(tuple(mylist)) time.sleep_ms(15) time.sleep_ms(300)[/mw_shl_code] |
© 2013-2025 Comsenz Inc. Powered by Discuz! X3.4 Licensed