(SKU:BRD080049) Tentacle 耳机模块电子积木模块适用于Micro:bit

来自YwRobot Studio Wiki
YWrobot WB2讨论 | 贡献2019年2月18日 (一) 17:25的版本 使用教程

跳转至: 导航搜索
Tentacle 耳机模块电子积木模块适用于Micro:bit


产品参数

  • 名称:Tentacle 耳机接口转换模块
  • 尺寸:30*30mm
  • 电压:3-3.3V
  • 输出:模拟量信号
  • 阻值:10K (调节耳机音量大小)
  • 旋转电位器旋转角度:270°
  • 接口:鳄鱼夹接口
  • 音频接口:支持3.5mm接口耳机
  • 平台:Arduino、单片机、ARM、树莓派

使用教程

Tentacle 耳机接口转接连主板.jpg
Tentacle 耳机接口转接连接.jpg

样例代码

int ledPin = 9;
int potPin = 2;
void setup()
{
  pinMode(ledPin,OUTPUT);
  pinMode(potPin,INPUT);
}
 
void loop(){
  if(digitalRead(potPin)==LOW){
    digitalWrite(ledPin,HIGH);
  }
    if(digitalRead(potPin)==HIGH){
    digitalWrite(ledPin,LOW);
    }
}

更多

[YWRobot产品资料下载]

购买 YWRobot商城购买链接