显示页面修订记录反向链接回到顶部 本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。 ====== MP3模块 ====== {{ :wm_wiki:mp3_module:pasted:20190511-165917.png }} ===== 1. 模块介绍 ===== <html><body> <p class=MsoNormal style='text-indent:21.0pt'><span style='font-size:16.0pt; line-height:107%'>MP3</span><span lang=ZH-CN style='font-size:16.0pt; line-height:107%;font-family:宋体'>模块是一个用于控制播放</span><span style='font-size:16.0pt; line-height:107%'>MP3</span><span lang=ZH-CN style='font-size:16.0pt; line-height:107%;font-family:宋体'>文件的音频播放模块。模块板载了一个</span><span style='font-size:16.0pt;line-height:107%'>0.1W</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>的喇叭,可以直接播放音乐,不需要另外再接喇叭。同时也可以通过插针接口,外接功率更大的喇叭。模块内置</span><span style='font-size:16.0pt;line-height:107%'>4M</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>内存,可以存放少量音频文件,同时也支持</span><span style='font-size:16.0pt;line-height:107%'>TF</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>卡,用户可以存入更多更大的音频文件。</span></p> </body></html> ===== 2. 模块参数 ===== <html><body> <div align=center> <table class=MsoTable15List5DarkAccent5 border=1 cellspacing=0 cellpadding=0 style='border-collapse:collapse;border:none;mso-border-alt:solid #5B9BD5 3.0pt; mso-border-themecolor:accent5;mso-yfti-tbllook:1184;mso-padding-alt:0in 5.4pt 0in 5.4pt'> <tr style='mso-yfti-irow:-1;mso-yfti-firstrow:yes;mso-yfti-lastfirstrow:yes'> <td width=173 valign=top style='width:130.1pt;border-top:solid #5B9BD5 3.0pt; mso-border-top-themecolor:accent5;border-left:solid #5B9BD5 3.0pt;mso-border-left-themecolor: accent5;border-bottom:solid white 2.25pt;mso-border-bottom-themecolor:background1; border-right:none;background:#5B9BD5;mso-background-themecolor:accent5; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal;mso-yfti-cnfc:517'><span lang=ZH-CN style='font-size:18.0pt;font-family:宋体;color:white;mso-themecolor:background1'>参数</span><b><span style='font-size:18.0pt;color:white;mso-themecolor:background1'><o:p></o:p></span></b></p> </td> <td width=395 valign=top style='width:295.9pt;border-top:solid #5B9BD5 3.0pt; mso-border-top-themecolor:accent5;border-left:none;border-bottom:solid white 2.25pt; mso-border-bottom-themecolor:background1;border-right:solid #5B9BD5 3.0pt; mso-border-right-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: accent5;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal;mso-yfti-cnfc:1'><span lang=ZH-CN style='font-size:18.0pt;font-family:宋体;color:white;mso-themecolor:background1'>值</span><span style='font-size:18.0pt;color:white;mso-themecolor:background1'>/</span><span lang=ZH-CN style='font-size:18.0pt;font-family:宋体;color:white;mso-themecolor: background1'>描述</span><b><span style='font-size:18.0pt;color:white; mso-themecolor:background1'><o:p></o:p></span></b></p> </td> </tr> <tr style='mso-yfti-irow:0'> <td width=173 valign=top style='width:130.1pt;border-top:none;border-left: solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:solid white 1.0pt; mso-border-bottom-themecolor:background1;border-right:solid white 1.0pt; mso-border-right-themecolor:background1;mso-border-top-alt:solid white .5pt; mso-border-top-themecolor:background1;mso-border-alt:solid white .5pt; mso-border-themecolor:background1;mso-border-left-alt:solid #5B9BD5 3.0pt; mso-border-left-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: accent5;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal;mso-yfti-cnfc:68'><b><span lang=ZH-CN style='font-size:16.0pt;font-family:宋体;color:white;mso-themecolor:background1'>工作电压</span></b><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'><o:p></o:p></span></b></p> </td> <td width=395 valign=top style='width:295.9pt;border-top:none;border-left: none;border-bottom:solid white 1.0pt;mso-border-bottom-themecolor:background1; border-right:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; mso-border-top-alt:solid white .5pt;mso-border-top-themecolor:background1; mso-border-bottom-alt:solid white .5pt;mso-border-bottom-themecolor:background1; mso-border-right-alt:solid #5B9BD5 3.0pt;mso-border-right-themecolor:accent5; background:#5B9BD5;mso-background-themecolor:accent5;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-yfti-cnfc:64'><span style='font-size:16.0pt;color:white; mso-themecolor:background1'>DC 5V<o:p></o:p></span></p> </td> </tr> <tr style='mso-yfti-irow:1'> <td width=173 valign=top style='width:130.1pt;border-top:none;border-left: solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5;border-bottom:none; border-right:solid white 1.0pt;mso-border-right-themecolor:background1; mso-border-left-alt:solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5; mso-border-right-alt:solid white .5pt;mso-border-right-themecolor:background1; background:#5B9BD5;mso-background-themecolor:accent5;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal;mso-yfti-cnfc:4'><b><span lang=ZH-CN style='font-size:16.0pt;font-family:宋体;color:white;mso-themecolor:background1'>通信方式</span></b><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'><o:p></o:p></span></b></p> </td> <td width=395 valign=top style='width:295.9pt;border:none;border-right:solid #5B9BD5 3.0pt; mso-border-right-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: accent5;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>WM</span><span lang=ZH-CN style='font-size:16.0pt;font-family:宋体;color:white;mso-themecolor: background1'>单总线</span><span style='font-size:16.0pt;color:white;mso-themecolor: background1'><o:p></o:p></span></p> </td> </tr> <tr style='mso-yfti-irow:2;mso-yfti-lastrow:yes'> <td width=173 valign=top style='width:130.1pt;border:solid white 1.0pt; mso-border-themecolor:background1;border-left:solid #5B9BD5 3.0pt;mso-border-left-themecolor: accent5;mso-border-alt:solid white .5pt;mso-border-themecolor:background1; mso-border-left-alt:solid #5B9BD5 3.0pt;mso-border-left-themecolor:accent5; background:#5B9BD5;mso-background-themecolor:accent5;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal;mso-yfti-cnfc:68'><b><span lang=ZH-CN style='font-size:16.0pt;font-family:宋体;color:white;mso-themecolor:background1'>尺寸大小</span></b><b><span style='font-size:16.0pt;color:white;mso-themecolor:background1'><o:p></o:p></span></b></p> </td> <td width=395 valign=top style='width:295.9pt;border-top:solid white 1.0pt; mso-border-top-themecolor:background1;border-left:none;border-bottom:solid white 1.0pt; mso-border-bottom-themecolor:background1;border-right:solid #5B9BD5 3.0pt; mso-border-right-themecolor:accent5;mso-border-top-alt:solid white .5pt; mso-border-top-themecolor:background1;mso-border-bottom-alt:solid white .5pt; mso-border-bottom-themecolor:background1;mso-border-right-alt:solid #5B9BD5 3.0pt; mso-border-right-themecolor:accent5;background:#5B9BD5;mso-background-themecolor: accent5;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal;mso-yfti-cnfc:64'><span style='font-size:16.0pt;color:white; mso-themecolor:background1'>55mm * 24mm * 18.5mm</span><span lang=ZH-CN style='font-size:16.0pt;font-family:宋体;color:white;mso-themecolor:background1'>(长</span><span style='font-size:16.0pt;color:white;mso-themecolor:background1'>*</span><span lang=ZH-CN style='font-size:16.0pt;font-family:宋体;color:white;mso-themecolor: background1'>宽</span><span style='font-size:16.0pt;color:white;mso-themecolor: background1'>*</span><span lang=ZH-CN style='font-size:16.0pt;font-family: 宋体;color:white;mso-themecolor:background1'>高)</span><span style='font-size: 16.0pt;color:white;mso-themecolor:background1'><o:p></o:p></span></p> </td> </tr> </table> </div> </body></html> ===== 3. 模块使用 ===== ==== 3.1. 存入文件 ==== <html><body> <p class=MsoNormal style='text-indent:21.0pt'><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>模块上有一个</span><span style='font-size:16.0pt;line-height:107%'>microUSB</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>接口,通过</span><span style='font-size:16.0pt;line-height:107%'>USB </span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>连接电脑,电脑上会以</span><span style='font-size:16.0pt;line-height:107%'>U</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>盘的形式读出,此时直接往里面放入</span><span style='font-size:16.0pt;line-height:107%'>MP3</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>格式的音频文件就好了。注意,内置的</span><span style='font-size:16.0pt;line-height:107%'>flash</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>卡只有</span><span style='font-size:16.0pt;line-height:107%'>4M</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>大小。更大的文件需要存入</span><span style='font-size:16.0pt;line-height:107%'>TF</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>卡,然后插入模块上面的</span><span style='font-size:16.0pt;line-height:107%'>TF</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>卡槽中去。</span></p> </body></html> ==== 3.2. 测试播放 ==== <html><body> <p class=MsoNormal style='text-indent:21.0pt'><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>用</span><span style='font-size:16.0pt;line-height:107%'>RJ11</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>线连接主控板通电后,模块上</span><span style='font-size:16.0pt;line-height:107%'>L1</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>的指示灯会常亮,此时可以按下模块上的白色按键,如果模块上已经有文件,不需要编程就会立刻播放文件,同时</span><span style='font-size:16.0pt;line-height:107%'>L1</span><span lang=ZH-CN style='font-size:16.0pt;line-height:107%;font-family:宋体'>的指示灯会闪烁,当播放停止时,常亮。</span></p> </body></html> ===== 4. 编程指南 ===== ==== 4.1. 功能介绍及编程指南 ==== <html><body> <p class=MsoNormal><span style='font-size:16.0pt'>4.1.1 </span><span lang=ZH-CN style='font-size:18.0pt;font-family:等线'>模块功能及图形化编程指南</span></p> <p class=MsoNormal style='text-indent:.5in'><span lang=ZH-CN style='font-size: 16.0pt;font-family:等线'>该模块支持的图形化编程平台有</span><span style='font-size:16.0pt'>WeeeCode</span><span lang=ZH-CN style='font-size:16.0pt;font-family:等线'>、编程猫平台、</span><span style='font-size:16.0pt'>Mixly_Arduino</span><span lang=ZH-CN style='font-size: 16.0pt;font-family:等线'>、</span><span style='font-size:16.0pt'>MakeCode</span><span lang=ZH-CN style='font-size:16.0pt;font-family:等线'>等,其图形化编程大同小异,区别不会很大。</span></p> <div align=center> <table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse;mso-yfti-tbllook:1184;mso-padding-alt:0in 0in 0in 0in'> <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;height:24.7pt'> <td width=244 valign=top style='width:183.3pt;border:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:24.7pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><b><span lang=ZH-CN style='font-size: 14.0pt;font-family:等线;color:windowtext;background:white'>模块功能</span></b></p> </td> <td width=189 valign=top style='width:142.05pt;border:solid windowtext 1.0pt; border-left:none;padding:0in 5.4pt 0in 5.4pt;height:24.7pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span class=GramE><b><span lang=ZH-CN style='font-size:14.0pt;font-family:等线;color:windowtext;background:white'>需传参数</span></b></span></p> </td> <td width=455 valign=top style='width:341.05pt;border:solid windowtext 1.0pt; border-left:none;padding:0in 5.4pt 0in 5.4pt;height:24.7pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><b><span lang=ZH-CN style='font-size: 14.0pt;font-family:等线;color:windowtext;background:white'>图形化编程块举例</span></b><b style='box-sizing: border-box;font-variant-ligatures: normal;font-variant-caps: normal; orphans: 2;widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif;color:windowtext; background:white'>(</span></span></b><b style='box-sizing: border-box; font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span lang=ZH-CN style='font-size:14.0pt;font-family:等线;color:windowtext; background:white'>其他平台图形化编程块大同小异</span></span></b><b style='box-sizing: border-box; font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'><span style='box-sizing: border-box'><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif;color:windowtext; background:white'>)</span></span></b></p> </td> </tr> <tr style='mso-yfti-irow:1'> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span lang=ZH-CN style='font-size:14.0pt; font-family:等线;color:windowtext;background:white'>选择</span><span style='font-size:14.0pt;font-family:等线;color:windowtext;background:white'>MP3<span lang=ZH-CN>文件播放来源:内置</span>FLASH<span lang=ZH-CN>或</span>TF<span lang=ZH-CN>卡</span></span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span lang=ZH-CN style='font-size:14.0pt;font-family:等线;color:windowtext; background:white'>(</span><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:windowtext;background:white'><span style='box-sizing: border-box; font-variant-ligatures: normal;font-variant-caps: normal;orphans: 2; widows: 2;-webkit-text-stroke-width: 0px;text-decoration-style: initial; text-decoration-color: initial;word-spacing:0px'>2</span></span><span lang=ZH-CN style='font-size:14.0pt;font-family:等线;color:windowtext; background:white'>个参数)端口</span><span lang=ZH-CN style='font-size:14.0pt; font-family:宋体;color:windowtext;background:white'>、播放文件源</span></p> </td> <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='color:windowtext'><span style='mso-no-proof:yes'><img width=372 height=125 id="_x0000_i1032" src="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122341.png" alt="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122341.png"></span></span></p> </td> </tr> <tr style='mso-yfti-irow:2;height:54.4pt'> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0in 5.4pt 0in 5.4pt;height:54.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span lang=ZH-CN style='font-size:14.0pt; font-family:等线;color:windowtext;background:white'>设置播放音量</span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:54.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span lang=ZH-CN style='font-size:14.0pt;font-family:宋体;color:windowtext; background:white'>(</span><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:windowtext;background:white'>2</span><span lang=ZH-CN style='font-size: 14.0pt;font-family:宋体;color:windowtext;background:white'>个参数)端口、播放音量值(</span><span style='font-size:14.0pt;font-family:宋体;color:windowtext;background:white'>0~30<span lang=ZH-CN>)</span></span></p> </td> <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:54.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='color:windowtext'><span style='mso-no-proof:yes'><img width=261 height=62 id="_x0000_i1031" src="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122433.png" alt="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122433.png"></span></span></p> </td> </tr> <tr style='mso-yfti-irow:3'> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span lang=ZH-CN style='font-size:14.0pt; font-family:等线;color:windowtext;background:white'>指定播放第几首</span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span lang=ZH-CN style='font-size:14.0pt;font-family:宋体;color:windowtext; background:white'>(</span><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:windowtext;background:white'>2</span><span lang=ZH-CN style='font-size: 14.0pt;font-family:宋体;color:windowtext;background:white'>个参数)端口</span><span lang=ZH-CN style='font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family: Calibri;color:windowtext'>、</span><span lang=ZH-CN style='font-size:14.0pt; font-family:宋体;color:windowtext;background:white'>播放音量值(</span><span style='font-size:14.0pt;font-family:宋体;color:windowtext;background:white'>1~3000<span lang=ZH-CN>)</span></span></p> </td> <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='color:windowtext'><span style='mso-no-proof:yes'><img width=271 height=63 id="_x0000_i1030" src="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122547.png" alt="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122547.png"></span></span></p> </td> </tr> <tr style='mso-yfti-irow:4'> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='font-size:14.0pt; font-family:等线;color:windowtext;background:white'> <span lang=ZH-CN>恢复播放</span></span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span lang=ZH-CN style='font-size:14.0pt;font-family:宋体;color:windowtext; background:white'>(</span><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:windowtext;background:white'>1</span><span lang=ZH-CN style='font-size: 14.0pt;font-family:宋体;color:windowtext;background:white'>个参数)端口</span></p> </td> <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='color:windowtext'><span style='mso-no-proof:yes'><img width=216 height=60 id="_x0000_i1029" src="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122625.png" alt="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122625.png"></span></span></p> </td> </tr> <tr style='mso-yfti-irow:5;height:45.8pt'> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0in 5.4pt 0in 5.4pt;height:45.8pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='font-size:14.0pt; font-family:等线;color:windowtext;background:white'> <span lang=ZH-CN>暂停播放</span></span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:45.8pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span lang=ZH-CN style='font-size:14.0pt;font-family:宋体;color:windowtext; background:white'>(</span><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:windowtext;background:white'>1</span><span lang=ZH-CN style='font-size: 14.0pt;font-family:宋体;color:windowtext;background:white'>个参数)端口</span></p> </td> <td width=455 style='width:341.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt;height:45.8pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='color:windowtext'><span style='mso-no-proof:yes'><img width=215 height=61 id="_x0000_i1028" src="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122653.png" alt="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122653.png"></span></span></p> </td> </tr> <tr style='mso-yfti-irow:6'> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='font-size:14.0pt; font-family:等线;color:windowtext;background:white'> <span lang=ZH-CN>上一首</span></span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span lang=ZH-CN style='font-size:14.0pt;font-family:宋体;color:windowtext; background:white'>(</span><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:windowtext;background:white'>1</span><span lang=ZH-CN style='font-size: 14.0pt;font-family:宋体;color:windowtext;background:white'>个参数)端口</span></p> </td> <td width=455 style='width:341.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='color:windowtext'><span style='mso-no-proof:yes'><img width=200 height=63 id="_x0000_i1027" src="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122719.png" alt="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122719.png"></span></span></p> </td> </tr> <tr style='mso-yfti-irow:7'> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='font-size:14.0pt; font-family:等线;color:windowtext;background:white'> <span lang=ZH-CN>下一首</span></span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span lang=ZH-CN style='font-size:14.0pt;font-family:宋体;color:windowtext; background:white'>(</span><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:windowtext;background:white'>1</span><span lang=ZH-CN style='font-size: 14.0pt;font-family:宋体;color:windowtext;background:white'>个参数)端口</span></p> </td> <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='color:windowtext'><span style='mso-no-proof:yes'><img width=199 height=61 id="_x0000_i1026" src="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122845.png" alt="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122845.png"></span></span></p> </td> </tr> <tr style='mso-yfti-irow:8;mso-yfti-lastrow:yes'> <td width=244 style='width:183.3pt;border:solid windowtext 1.0pt;border-top: none;padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span lang=ZH-CN style='font-size:14.0pt; font-family:等线;color:windowtext;background:white'>判断当前曲目是否播放完毕</span></p> </td> <td width=189 style='width:142.05pt;border-top:none;border-left:none; border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal style='margin-bottom:0in;margin-bottom:.0001pt;line-height: normal'><span lang=ZH-CN style='font-size:14.0pt;font-family:宋体;color:windowtext; background:white'>(</span><span style='font-size:14.0pt;font-family:"Helvetica",sans-serif; color:windowtext;background:white'>1</span><span lang=ZH-CN style='font-size: 14.0pt;font-family:宋体;color:windowtext;background:white'>个参数)端口</span></p> </td> <td width=455 valign=top style='width:341.05pt;border-top:none;border-left: none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt; padding:0in 5.4pt 0in 5.4pt'> <p class=MsoNormal align=center style='margin-bottom:0in;margin-bottom:.0001pt; text-align:center;line-height:normal'><span style='color:windowtext'><span style='mso-no-proof:yes'><img width=271 height=47 id="_x0000_i1025" src="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122927.png" alt="lib/exe/fetch.php?media=wm_wiki:mp3_module:pasted:20190510-122927.png"></span></span></p> </td> </tr> </table> </div> <p class=MsoNormal> </p> <p class=MsoNormal><span style='font-size:18.0pt'>4.1.2 </span><span lang=ZH-CN style='font-size:18.0pt;font-family:等线'>文本代码编程指南</span></p> <p class=MsoNormal style='text-indent:.5in'><span lang=ZH-CN style='font-size: 16.0pt;font-family:等线'>直接使用文本代码编程,就涉及到相关编程</span><span style='font-size:16.0pt'>API:</span></p> <p class=MsoNormal><span style='font-size:16.0pt'> Arduino-C/C++ API</span><span lang=ZH-CN style='font-size:16.0pt;font-family:等线'>:</span><b><span style='font-size:16.0pt'><a href="doku.php?id=wm_wiki:arduino_ide:api_document#mp3%E6%A8%A1%E5%9D%97api"><span lang=ZH-CN style='font-family:等线;text-decoration:none'>查看相关</span><span style='text-decoration:none'>API</span></a></span></b></p> <p class=MsoNormal><span style='font-size:16.0pt'> Micro:bit-micropython API</span><span lang=ZH-CN style='font-size:16.0pt;font-family:等线'>:</span><b><span style='font-size:16.0pt'><a href="doku.php?id=wm_wiki:micropython:api_document#mp3%E6%A8%A1%E5%9D%97api"><span lang=ZH-CN style='font-family:等线;text-decoration:none'>查看相关</span><span style='text-decoration:none'>API</span></a></span></b></p> </body></html> ==== 4.2. 编程示例 ==== ===== 5. 外接喇叭 ===== <html><body> <p class=MsoNormal style='text-indent:21.0pt'><span class=GramE><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>如果板载喇叭</span></span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>的音量和声音品质不能满足要求,可以通过按键旁边的</span><span style='font-size:16.0pt;line-height:105%'>2pin</span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>插针来扩展喇叭,建议接入</span><span style='font-size:16.0pt;line-height:105%'>3W</span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>以内的喇叭。工作时外接喇叭和<span class=GramE>板载</span>喇叭会同时响。</span><span style='font-size:16.0pt;line-height: 105%'><o:p></o:p></span></p> </body></html> ===== 6. 注意事项 ===== <html><body> <p class=MsoNormal style='margin-left:10.5pt'><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体;mso-ascii-font-family: Calibri;mso-hansi-font-family:Calibri'>(</span><span style='font-size:16.0pt; line-height:105%'>1</span><span lang=ZH-CN style='font-size:16.0pt;line-height: 105%;font-family:宋体'>)模块只支持</span><span style='font-size:16.0pt;line-height: 105%'>MP3</span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%; font-family:宋体'>格式;</span><span style='font-size:16.0pt;line-height:105%; font-family:宋体'><o:p></o:p></span></p> <p class=MsoNormal style='margin-left:10.5pt'><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>(</span><span style='font-size:16.0pt;line-height:105%'>2</span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>)曲目排序会按照存入</span><span style='font-size:16.0pt;line-height:105%;font-family:宋体'>Flash<span lang=ZH-CN>或</span>TF<span lang=ZH-CN>卡先后顺序排列的,即最先存入的曲目为第</span>1<span lang=ZH-CN>首,按照存入先后顺序依次往后排序;</span></span><span style='font-size:16.0pt;line-height:105%'><o:p></o:p></span></p> <p class=MsoNormal style='margin-left:10.5pt'><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体;mso-ascii-font-family: Calibri;mso-hansi-font-family:Calibri'>(</span><span style='font-size:16.0pt; line-height:105%'>3</span><span lang=ZH-CN style='font-size:16.0pt;line-height: 105%;font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri'>)</span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>编程时,注意循环条件中极短时间内重复调用播放歌曲指令,这样会导致歌曲播放不出,最好加入播放歌曲时间长度的延迟;</span><span style='font-size:16.0pt;line-height:105%'><o:p></o:p></span></p> <p class=MsoNormal style='margin-left:10.5pt'><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体;mso-ascii-font-family: Calibri;mso-hansi-font-family:Calibri'>(</span><span style='font-size:16.0pt; line-height:105%'>4</span><span lang=ZH-CN style='font-size:16.0pt;line-height: 105%;font-family:宋体;mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri'>)</span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>外接喇叭时,要注意模块散热,不能使模块过热;</span><span style='font-size:16.0pt;line-height:105%;font-family:宋体'><o:p></o:p></span></p> <p class=MsoNormal style='margin-left:10.5pt'><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>(</span><span style='font-size:16.0pt;line-height:105%'>5</span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>)模块不要经常处于最大音量,以防减少喇叭寿命;</span><span style='font-size:16.0pt;line-height:105%;font-family:宋体'><o:p></o:p></span></p> <p class=MsoNormal style='margin-left:10.5pt'><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>(</span><span style='font-size:16.0pt;line-height:105%'>6</span><span lang=ZH-CN style='font-size:16.0pt;line-height:105%;font-family:宋体'>)该模块属于较耗电模块,使用时最好外接电源。</span><span style='font-size:16.0pt;line-height:105%'><o:p></o:p></span></p> </body></html>