A timely post, as I was consternated at the reluctance of my remote (cheap Chinese universal remote). I'm actually getting very similar timings but they are decoded differently, for example:
Encoding : NEC
Code : 33B8609F (32 bits)
Timing[67]:
+8950, -4500 + 500, - 600 + 500, - 600 + 500, -1750
+ 500, -1700 + 550, - 600 + 500, - 600 + 500, -1700
+ 550, -1700 + 550, -1700 + 500, - 600 + 550, -1700
+ 500, -1700 + 550, -1700 + 500, - 600 + 550, - 600
+ 500, - 600 + 500, - 600 + 550, -1700 + 500, -1700
+ 550, - 600 + 500, - 600 + 500, - 600 + 500, - 600
+ 550, - 600 + 500, -1700 + 550, - 600 + 500, - 600
+ 500, -1750 + 500, -1700 + 500, -1750 + 500, -1700
+ 550, -1700 + 500
Encoding : UNKNOWN
Code : 9866EE37 (32 bits)
Timing[67]:
+8950, -4500 + 500, - 600 + 500, - 650 + 500, -1700
+ 500, -1700 + 550, - 600 + 500, - 600 + 500, -1700
+ 550, -1750 + 500, -1700 + 500, - 600 + 550, -1700
+ 500, -1700 + 550, -1700 + 500, - 600 + 550, - 600
+ 500, - 650 + 450, - 650 + 500, -1700 + 500, -1750
+ 500, - 600 + 500, - 600 + 500, - 600 + 500, - 650
+ 500, - 600 + 500, -1750 + 500, - 600 + 500, - 600
+ 500, -1750 + 500, -1700 + 500, -1750 + 500, -1700
+ 550, -1700 + 500
Encoding : JVC
Code : 33B8 (16 bits)
Timing[67]:
+8950, -4450 + 550, - 550 + 550, - 600 + 500, -1700
+ 550, -1700 + 500, - 600 + 500, - 600 + 550, -1700
+ 500, -1750 + 500, -1700 + 550, - 600 + 500, -1700
+ 550, -1700 + 500, -1700 + 550, - 600 + 500, - 600
+ 500, - 600 + 550, -1700 + 500, - 600 + 550, -1700
+ 500, - 600 + 500, - 600 + 550, - 600 + 500, - 600
+ 500, - 650 + 500, - 600 + 500, -1700 + 500, - 600
+ 550, -1700 + 500, -1750 + 500, -1700 + 550, -1700
+ 500, -1750 + 500
These were received a few seconds apart, pointing the remote at the ceiling. I changed the tolerance in compare(), as suggested in reply #30, to 50% but it doesn't seem much better:
Encoding : NEC
Code : 33B8A05F (32 bits)
Timing[67]:
+8950, -4500 + 500, - 600 + 500, - 600 + 550, -1700
+ 500, -1700 + 550, - 600 + 500, - 600 + 500, -1700
+ 550, -1700 + 550, -1700 + 500, - 600 + 550, -1700
+ 500, -1750 + 500, -1700 + 500, - 600 + 550, - 600
+ 500, - 600 + 500, -1750 + 500, - 600 + 500, -1750
+ 500, - 600 + 500, - 600 + 500, - 600 + 550, - 550
+ 550, - 600 + 500, - 600 + 550, -1700 + 500, - 600
+ 500, -1750 + 500, -1700 + 550, -1700 + 500, -1750
+ 500, -1700 + 550
Encoding : JVC
Code : 33B8 (16 bits)
Timing[67]:
+8950, -4500 + 500, - 600 + 500, - 600 + 500, -1750
+ 500, -1700 + 550, - 600 + 500, - 600 + 500, -1700
+ 550, -1700 + 550, -1700 + 500, - 600 + 500, -1750
+ 500, -1700 + 550, -1700 + 500, - 600 + 500, - 600
+ 550, - 600 + 500, -1700 + 550, - 600 + 500, -1700
+ 550, - 550 + 550, - 600 + 500, - 600 + 500, - 600
+ 500, - 650 + 500, - 600 + 500, -1700 + 550, - 600
+ 500, -1700 + 550, -1700 + 500, -1700 + 550, -1700
+ 500, -1750 + 500
Encoding : UNKNOWN
Code : A0F5DAD5 (32 bits)
Timing[67]:
+8950, -4500 + 500, - 600 + 500, - 600 + 500, -1750
+ 500, -1700 + 550, - 650 + 450, - 600 + 500, -1700
+ 550, -1700 + 550, -1700 + 500, - 600 + 500, -1750
+ 500, -1700 + 550, -1700 + 500, - 600 + 500, - 600
+ 550, - 600 + 500, -1750 + 500, - 600 + 500, -1700
+ 550, - 550 + 550, - 600 + 500, - 600 + 500, - 600
+ 500, - 650 + 500, - 600 + 500, -1700 + 550, - 600
+ 500, -1700 + 550, -1700 + 500, -1700 + 550, -1700
+ 500, -1750 + 500
Hmmmmm..... is it really a 64 bit code? Based on persistent use, the "NEC" code is the correct decode.
Update - from the link given above Using arbitrary remotes with the Arduino IRremote library, I get
If your remote uses a protocol with multiple duration values, you probably won't get unique values from this algorithm.
I see three values in the timings so maybe that's it. But looking at the algorithm, I can't see why there should be such a difference. Am I missing something obvious?