5235浏览
楼主: 驴友花雕

[MP动手做] MicroPython动手做(14)——掌控板之OLED屏

[复制链接]

驴友花雕  中级技神
 楼主|

发表于 2020-4-19 12:04:02

MicroPython动手做(14)——掌控板之OLED屏图1
回复

使用道具 举报

gada888  版主

发表于 2020-4-27 11:31:37

知识点爆多
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2020-4-27 12:09:24


谢谢版主的鼓励
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2020-5-7 16:22:26

11、OLED满屏流水字

#MicroPython动手做(14)——掌控板之OLED屏幕
#OLED满屏流水字


[mw_shl_code=applescript,false]#MicroPython动手做(14)——掌控板之OLED屏幕
#OLED满屏流水字

from mpython import *
import time


rgb.fill((int(0), int(0), int(102)))
rgb.write()
time.sleep_ms(1)
while True:
    _E8_A1_8C = 0
    while not _E8_A1_8C >= 4:
        _E5_88_97 = 0
        while not _E5_88_97 >= 8:
            oled.fill(0)
            oled.DispChar("掌控板OLED", (_E5_88_97 * 16), (_E8_A1_8C * 16), 1)
            oled.show()
            _E5_88_97 = _E5_88_97 + 1
        _E8_A1_8C = _E8_A1_8C + 1
    _E8_A1_8C = 0
    while not _E8_A1_8C >= 4:
        _E5_88_97 = 0
        while not _E5_88_97 >= 8:
            oled.fill(0)
            oled.DispChar("mPython", (_E5_88_97 * 16), (_E8_A1_8C * 16), 1)
            oled.show()
            _E5_88_97 = _E5_88_97 + 1
        _E8_A1_8C = _E8_A1_8C + 1[/mw_shl_code]
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2020-5-7 16:27:48

mPython X 图形编程

MicroPython动手做(14)——掌控板之OLED屏图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2020-5-7 16:38:13

MicroPython动手做(14)——掌控板之OLED屏图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2020-5-7 17:26:02

12、跳动屏显32个字

//MicroPython动手做(14)——掌控板之OLED屏幕
//跳动屏显32个字

[mw_shl_code=applescript,false]//MicroPython动手做(14)——掌控板之OLED屏幕
//跳动屏显32个字

#include <MPython.h>

// 动态变量
volatile float mind_n_Xing, mind_n_Lie;


// 主程序开始
void setup() {
        mPython.begin();
}
void loop() {
        mind_n_Xing = 0;
        while (!(mind_n_Xing>=4)) {
                mind_n_Lie = 0;
                while (!(mind_n_Lie>=8)) {
                        display.setCursor((mind_n_Lie * 16), (mind_n_Xing * 16));
                        display.print("掌");
                        mind_n_Lie += 1;
                        yield();
                }
                mind_n_Xing += 1;
                yield();
        }
        buzz.freq(196, BEAT_1_4);
        delay(1000);
        mind_n_Xing = 0;
        while (!(mind_n_Xing>=4)) {
                mind_n_Lie = 0;
                while (!(mind_n_Lie>=8)) {
                        display.setCursor((mind_n_Lie * 16), (mind_n_Xing * 16));
                        display.print("控");
                        mind_n_Lie += 1;
                        yield();
                }
                mind_n_Xing += 1;
                yield();
        }
        buzz.freq(196, BEAT_1_4);
        delay(1000);
        mind_n_Xing = 0;
        while (!(mind_n_Xing>=4)) {
                mind_n_Lie = 0;
                while (!(mind_n_Lie>=8)) {
                        display.setCursor((mind_n_Lie * 16), (mind_n_Xing * 16));
                        display.print("板");
                        mind_n_Lie += 1;
                        yield();
                }
                mind_n_Xing += 1;
                yield();
        }
        buzz.freq(392, BEAT_1_4);
        delay(1000);
}
[/mw_shl_code]
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2020-5-7 17:30:37

Mind+ 图形编程

MicroPython动手做(14)——掌控板之OLED屏图1
回复

使用道具 举报

驴友花雕  中级技神
 楼主|

发表于 2020-5-7 17:36:02

MicroPython动手做(14)——掌控板之OLED屏图1
回复

使用道具 举报

12
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

为本项目制作心愿单
购买心愿单
心愿单 编辑
[[wsData.name]]

硬件清单

  • [[d.name]]
btnicon
我也要做!
点击进入购买页面
上海智位机器人股份有限公司 沪ICP备09038501号-4

© 2013-2024 Comsenz Inc. Powered by Discuz! X3.4 Licensed

mail