所有分类
主题 主题
平台 平台
我的工作台
userHead
注册时间 [[userInfo.create_time]]
创造力 [[userInfo.creativity]]
[[userInfo.remark]]
[[d.project_title]]
articleThumb
[[d.material_name]]
timelineThumb
进入工作台
折叠
所有分类 我的工作台
展开

掌控板做黑人抬棺音乐

虾虾^0^ 虾虾^0^ 2021-08-03 19:27:57
材料清单 材料清单
1x
掌控板
2x
Type-C&Micro二合一USB线
代码 代码
	                    					/*!
 * MindPlus
 * mpython
 *
 */
#include <MPython.h>

void onButtonAPressed();



void setup() {
	mPython.begin();
	buttonA.setPressedCallback(onButtonAPressed);
}
void loop() {

}

// 事件回调函数
void onButtonAPressed() {
	buzz.freq(349, BEAT_1);
	buzz.freq(349, BEAT_1);
	buzz.freq(349, BEAT_1);
	buzz.freq(349, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(523, BEAT_1);
	buzz.freq(523, BEAT_1);
	buzz.freq(523, BEAT_1);
	buzz.freq(523, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(349, BEAT_1);
	buzz.freq(330, BEAT_1);
	buzz.freq(262, BEAT_1);
	buzz.freq(294, BEAT_1);
	delay(100);
	buzz.freq(294, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(392, BEAT_1);
	delay(100);
	buzz.freq(349, BEAT_1);
	delay(100);
	buzz.freq(330, BEAT_1);
	delay(100);
	buzz.freq(330, BEAT_1);
	buzz.freq(330, BEAT_1);
	buzz.freq(392, BEAT_1);
	delay(100);
	buzz.freq(349, BEAT_1);
	buzz.freq(330, BEAT_1);
	buzz.freq(294, BEAT_1);
	delay(100);
	buzz.freq(294, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(659, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(659, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(294, BEAT_1);
	delay(100);
	buzz.freq(294, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(659, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(659, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(294, BEAT_1);
	delay(100);
	buzz.freq(294, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(392, BEAT_1);
	delay(100);
	buzz.freq(349, BEAT_1);
	delay(100);
	buzz.freq(330, BEAT_1);
	delay(100);
	buzz.freq(330, BEAT_1);
	buzz.freq(330, BEAT_1);
	buzz.freq(392, BEAT_1);
	delay(100);
	buzz.freq(349, BEAT_1);
	buzz.freq(330, BEAT_1);
	buzz.freq(294, BEAT_1);
	delay(100);
	buzz.freq(294, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(659, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(659, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(294, BEAT_1);
	delay(100);
	buzz.freq(294, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(659, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(659, BEAT_1);
	buzz.freq(698, BEAT_1);
	buzz.freq(349, BEAT_1);
	buzz.freq(349, BEAT_1);
	buzz.freq(349, BEAT_1);
	buzz.freq(349, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(440, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(392, BEAT_1);
	buzz.freq(523, BEAT_1);
	buzz.freq(523, BEAT_1);
	buzz.freq(523, BEAT_1);
	buzz.freq(523, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
	buzz.freq(587, BEAT_1);
}

	                    				
Makelog作者原创文章,未经授权禁止转载。
1
0
评论
[[c.user_name]] [[c.create_time]]
[[c.parent_comment.count]]
|
[[c.comment_content]]