知识点爆多 gada888 发表于 2020-4-27 11:31
知识点爆多
{:5_179:}谢谢版主的鼓励 11、OLED满屏流水字
#MicroPython动手做(14)——掌控板之OLED屏幕
#OLED满屏流水字
#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
mPython X 图形编程
12、跳动屏显32个字
//MicroPython动手做(14)——掌控板之OLED屏幕
//跳动屏显32个字
//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);
}
Mind+ 图形编程
页:
1
[2]