金牌会员
 
- 积分
- 1032
- 金钱
- 1032
- 注册时间
- 2017-7-26
- 在线时间
- 275 小时
|
NEC协议的红外遥控
资料上描述的帧格式: 同步码头、地址码、地址反码、控制码、控制反码
然后,还有一句:数据格式低位在前,高位在后的顺序发送
原子哥的程序,貌似是按照高位在前,低位在后的顺序发送。
[mw_shl_code=c,true]switch(key)
{
case 0:str="ERROR";break;
case 162:str="POWER";break;
case 98:str="UP";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;
}[/mw_shl_code]
大家有留意到这点吗?
|
|