“(SKU:BRD080049) Tentacle 耳机模块电子积木模块适用于Micro:bit”的版本间的差异
来自YwRobot Studio Wiki
YWrobot WB2(讨论 | 贡献) (创建页面,内容为“Tentacle 耳机模块电子积木模块适用于Micro:bit ==产品参数== *名称:Tentacle 耳机...”) |
YWrobot WB1(讨论 | 贡献) (→样例代码) |
||
(未显示另一用户的1个中间版本) | |||
第15行: | 第15行: | ||
==使用教程== | ==使用教程== | ||
− | [[File:Tentacle_耳机接口转接连主板.jpg|500px|]] | + | [[File:Tentacle_耳机接口转接连主板.jpg|500px|]]<br> |
− | [[File: | + | [[File:Tentacle_耳机接口转接连接.jpg|500px|]] |
===样例代码=== | ===样例代码=== | ||
<pre style="color:blue"> | <pre style="color:blue"> | ||
− | + | input.onButtonPressed(Button.A, function () { | |
− | + | music.playTone(262, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(262, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(392, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(392, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(440, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(440, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(392, music.beat(BeatFraction.Whole)) | |
− | + | basic.pause(500) | |
− | + | music.playTone(349, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(349, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(330, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(330, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(294, music.beat(BeatFraction.Whole)) | |
− | + | music.playTone(294, music.beat(BeatFraction.Whole)) | |
− | } | + | music.playTone(262, music.beat(BeatFraction.Whole)) |
+ | }) | ||
+ | |||
</pre> | </pre> | ||
2019年10月31日 (四) 16:24的最新版本
产品参数
- 名称:Tentacle 耳机接口转换模块
- 尺寸:30*30mm
- 电压:3-3.3V
- 输出:模拟量信号
- 阻值:10K (调节耳机音量大小)
- 旋转电位器旋转角度:270°
- 接口:鳄鱼夹接口
- 音频接口:支持3.5mm接口耳机
- 平台:Arduino、单片机、ARM、树莓派
使用教程
样例代码
input.onButtonPressed(Button.A, function () { music.playTone(262, music.beat(BeatFraction.Whole)) music.playTone(262, music.beat(BeatFraction.Whole)) music.playTone(392, music.beat(BeatFraction.Whole)) music.playTone(392, music.beat(BeatFraction.Whole)) music.playTone(440, music.beat(BeatFraction.Whole)) music.playTone(440, music.beat(BeatFraction.Whole)) music.playTone(392, music.beat(BeatFraction.Whole)) basic.pause(500) music.playTone(349, music.beat(BeatFraction.Whole)) music.playTone(349, music.beat(BeatFraction.Whole)) music.playTone(330, music.beat(BeatFraction.Whole)) music.playTone(330, music.beat(BeatFraction.Whole)) music.playTone(294, music.beat(BeatFraction.Whole)) music.playTone(294, music.beat(BeatFraction.Whole)) music.playTone(262, music.beat(BeatFraction.Whole)) })
更多
[YWRobot产品资料下载]