#MicroPython动手做(19)——掌控板之蜂鸣器与音乐
# 自编乐谱——生日快乐
from mpython import *
import music
while True:
oled.fill(0)
oled.DispChar(" 编曲:生日快乐", 0, (2-1)*16, 1)
oled.show()
music.pitch(392, 250);
music.pitch(392, 250);
music.pitch(440, 500);
music.pitch(392, 500);
music.pitch(523, 500);
music.pitch(494, 500);
music.pitch(0, 500);
music.pitch(392, 250);
music.pitch(392, 250);
music.pitch(440, 500);
music.pitch(392, 500);
music.pitch(587, 500);
music.pitch(523, 1000);
music.pitch(392, 250);
music.pitch(392, 250);
music.pitch(784, 500);
music.pitch(659, 500);
music.pitch(523, 500);
music.pitch(494, 500);
music.pitch(440, 1000);
music.pitch(440, 500);
music.pitch(0, 500);
music.pitch(698, 250);
music.pitch(698, 250);
music.pitch(659, 500);
music.pitch(523, 500);
music.pitch(587, 500);
music.pitch(523, 1000);
|