-->

How to send complex infrared hex code in arduino

2019-07-26 10:03发布

问题:

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