}
附:在tc中输出音乐speaker,可用函数:sound()、delay()和nosound()。
格式:
sound(频率)
delay(节拍)
nosound() //声音关闭
如上程序可把beep()替换为:
for(circle=0;circle<25;circle++){
sound(frequency[circle]);
delay(delay[circle]);
nosound();
}
附:在tc中输出音乐speaker,可用函数:sound()、delay()和nosound()。
格式:
sound(频率)
delay(节拍)
nosound() //声音关闭
如上程序可把beep()替换为:
for(circle=0;circle<25;circle++){
sound(frequency[circle]);
delay(delay[circle]);
nosound();