How to send complex infrared hex code in arduino

£可爱£侵袭症+ 提交于 2020-01-06 03:16:47

问题


I want to use arduino to control my air conditioner

I follow this instruction: http://www.instructables.com/id/Arduino-Remote-Control-Less-10/?ALLSTEPS

And i test with ON button of my MP3 remote, In step two, I have result:

unsigned int raw1[68] = {9000,4350,600,500,600,500,600,500,650,450,650,500,600,500,600,500,600,500,600,1650,550,1650,550,1700,500,1700,500,1700,550,1650,550,1700,500,1700,550,1650,550,1650,550,600,500,600,550,550,500,600,550,1650,550,600,500,550,550,600,500,1700,550,1700,500,1700,500,1700,550,550,550,1650,550,};
irsend.sendRaw(raw1,68,38);

I use arduino to run it, it work

After that, i test with ON button of my Toshiba Air conditioner, i have result

unsigned int raw2[100] = {4550,4100,750,1400,750,1400,700,1450,700,1450,700,350,700,350,700,1450,650,450,600,450,600,500,600,450,600,500,550,1600,550,1550,600,500,550,1600,550,500,550,500,550,550,550,550,500,550,500,550,550,1600,500,1650,500,1650,500,1650,500,1600,550,1600,500,1650,500,1650,500,550,550,550,500,550,500,600,500,550,500,550,550,550,500,550,500,600,500,1600,550,550,500,550,500,600,500,550,500,550,550,550,500,550,500,600,500,};
irsend.sendRaw(raw2,100,38);

I use arduino to run it, it doesn't work

I try it many time with many remote and i see when raw[] have 100 elements, it doesn't work, but when raw[] have 68 element: it work

Please help me!

Sorry for my bad english

Thanks

来源:https://stackoverflow.com/questions/37450541/how-to-send-complex-infrared-hex-code-in-arduino

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!