新手上路
- 积分
- 31
- 金钱
- 31
- 注册时间
- 2014-3-31
- 在线时间
- 2 小时
|
大家好,请教一个红外遥控的问题。在红外遥控实验中,使用led灯观察,为什么按键按下一次,灯有时会保持亮,有时是按一次灭一次?
switch(key)
{
case 0:str="ERROR";break;
case 162:str="POWER";break;
case 98:str="UP";
LED1=!LED1;
break;
case 2:str="PLAY";break;
case 226:str="ALIENTEK";break;
case 194:str="RIGHT";break;
case 34:str="LEFT";break;
case 224:str="VOL-";break;
case 168:str="DOWN";break;
case 144:str="VOL+";break;
case 104:str="1";break;
case 152:str="2";break;
case 176:str="3";break;
case 48:str="4";break;
case 24:str="5";break;
case 122:str="6";break;
case 16:str="7";break;
case 56:str="8";break;
case 90:str="9";break;
case 66:str="0";break;
case 82:str="DELETE";break;
} |
|