“(SKU:ELB060678/ELB060679)原装欧姆龙6*6按键按钮 黄键 白键”的版本间的差异
来自YwRobot Studio Wiki
YWrobot WM(讨论 | 贡献) (创建页面,内容为“原装欧姆龙6x6按键按钮 <br> ==产品参数== *尺寸:23*21mm *固定孔:3mm *孔...”) |
YWrobot WB1(讨论 | 贡献) |
||
| (未显示另一用户的1个中间版本) | |||
| 第1行: | 第1行: | ||
| − | [[image: | + | [[image:6*6按键模块.jpg|thumb|right|400px|原装欧姆龙6x6按键按钮]] |
| 第25行: | 第25行: | ||
*白色的作用力为0.98N,黄色的作用力为1.47N,请根据需要选购 | *白色的作用力为0.98N,黄色的作用力为1.47N,请根据需要选购 | ||
| − | + | ||
| − | + | ||
===样例代码=== | ===样例代码=== | ||
<pre style="color:blue"> | <pre style="color:blue"> | ||
| − | + | 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); | ||
| + | } | ||
| + | } | ||
</pre> | </pre> | ||
2019年4月24日 (三) 17:43的最新版本
产品参数
- 尺寸:23*21mm
- 固定孔:3mm
- 孔距:15mm
- 按键:6*6*4.3mm原装欧姆龙B3F系列按键
- 颜色:黄键 白键
- 触发力度:1.47N
- 电压:3.5、5V
- 输出:数字电平(按下低电平,释放高电平)
- 接口:Arduino 3P接口 S V G
- 平台:Arduino、单片机、ARM、树莓派
产品特性
- 采用原装欧姆按键,手感极佳
- 优质弹片,触发稳定,使用寿命长
- 黄键款,触发力度适中
- 不同颜色的欧姆龙按键手感是不同的,白色的手感最轻,黄色的手感适中
- 白色的作用力为0.98N,黄色的作用力为1.47N,请根据需要选购
样例代码
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产品资料下载]