Building an IR controller
-
Time for a new project.
Some time ago I build a serial gateway and a servo to control my floorheating thermostate.
Now I want to build a device to control a media box ( switch it off via my vera 3)Today I have hooked up a IR reciever and transmitter on a arduino uno.
Uploaded the sketch and tried to controll the media box.No , it isn't working , i think it is going wrong somewhere reading the IR-code.
Whatever button I press on a remote , it always shows the same code , for the transmitter of the mediabox it is "000000" , for the transmitter of a Yamaha amplifier , it is "ffffff" Every button on those remotes gives the same code, that can not be right.
Using the serial monitor this is confirmed. ( see the copy paste at the bottom of this post).
What is wrong? and what else can I try to read to correct code?
Thanks for the help ,
Cor
Here the output from serial monitor:
connecting at 115200
sensor started, id 105
send: 105-105-0-0 s=255,c=0,t=17,pt=0,l=3,st=ok:1.4
send: 105-105-0-0 s=255,c=3,t=6,pt=1,l=1,st=ok:0
read: 0-0-105 s=255,c=3,t=6,pt=0,l=1:M
send: 105-105-0-0 s=255,c=3,t=11,pt=0,l=9,st=ok:IR Sensor
send: 105-105-0-0 s=255,c=3,t=12,pt=0,l=3,st=ok:1.0
send: 105-105-0-0 s=3,c=0,t=3,pt=0,l=3,st=ok:1.4
Decoded NEC: Value:5EA1E21C (32 bits)
Raw samples(68): Gap:6094
Head: m8850 s4450
0:m500 s700 1:m450 s1700 2:m450 s700 3:m450 s1750
4:m450 s1800 5:m450 s1750 6:m450 s1800 7:m550 s550
8:m450 s1800 9:m500 s600 10:m550 s1700 11:m500 s600
12:m450 s650 13:m450 s700 14:m450 s650 15:m550 s170016:m450 s1750 17:m450 s1800 18:m500 s1700 19:m550 s600
20:m500 s600 21:m550 s600 22:m500 s1700 23:m450 s700
24:m500 s600 25:m500 s650 26:m500 s550 27:m550 s1700
28:m550 s1650 29:m500 s1750 30:m550 s550 31:m550 s60032:m500
Extent=66250
Mark min:450 max:550
Space min:550 max:1800send: 105-105-0-0 s=3,c=1,t=24,pt=0,l=8,st=ok:5ea1e21c
Decoded NEC: Value:FFFFFFFF (0 bits)
Raw samples(4): Gap:40500
Head: m8850 s2250
0:m450
Extent=11550
Mark min:450 max:450
Space min:32767 max:0send: 105-105-0-0 s=3,c=1,t=24,pt=0,l=8,st=ok:ffffffff
Decoded NEC: Value:FFFFFFFF (0 bits)
Raw samples(4): Gap:29764
Head: m8850 s2300
0:m500
Extent=11650
Mark min:500 max:500
Space min:32767 max:0send: 105-105-0-0 s=3,c=1,t=24,pt=0,l=8,st=ok:ffffffff
-
No one has a clue on how to troubleshoot this?
-
I don't know which IR library you are using, but this one is very good:
https://github.com/cyborg5/IRLib
Several examples to troubleshoot IR issues and don't forget to read the manual there (84 pages!).
-
pffff , 84 pages ..... it is something I have to read I guess .
Thanks for the info ..... I will report here if it is working ......
Cor