白雪 发表于 2014-6-19 17:08 
请问如何将收到的红外编码,就是在串口里看到的例如C3E10000保存下来?保存为a=0xC3E10000这样的
好像需要是字符串格式吧。。。a="C3E10000"
我自己录的格力的老式遥控器的开机代码,在我家的老空调上实验成功了。
- #include <IRremote.h>
-
- IRsend irsend;
- unsigned int buf[]= {
-
- 9200,4250,800,400,800,400,850,2300,800,2300,800,400,850,400,800,400,800,400,850,400,800,400,800,400,800,450,750,450,750,500,700,500,700,550,600,600,600,2550,600,600,600,650,550,2550,550,650,600,650,550,650,550,650,600,650,550,700,550,650,600,650,550,650,550,700,550,650,550,650,550,2600,550,650,550,650,600,2550,550,650,550,650,600,650,550,650,550,650,650,650,550,650,550,650,600,2550,550,650,550,700,550,650,550,2600,600,650,550,650,550
- };
-
- void setup()
- {
- }
-
- void loop() {
- irsend.sendRaw(buf,117,38);
- delay(3000);
- }
复制代码 |