cyborg5 / IRLib2

Library for receiving, decoding, and sending infrared signals using Arduino
GNU General Public License v3.0
384 stars 138 forks source link

RC5 detection repeats codes similar to a keybounce #41

Closed jkanasu closed 6 years ago

jkanasu commented 6 years ago

I am using the inbuilt "dump" example. The code is modified is to show the issue. I have a remove of "VU TV" remote model "ER-22645VU" which generates RC5 standard IR signals. I press the keys only "once" but the program dumps it twice. In the modified program the delay is reduced when we dumpResults with less detail. This creates the issue. When the dump is in full detail, the issue does not exist. It seems like if there is enough delay between the getResults and the enableIRIn method calls the issue does not show up. See attached file image. irlibrc5protocol

cyborg5 commented 6 years ago

If the dump routine is reporting two frames of data then that's what you're remote is sending. Putting in the delay just means that IRLib is missing that repeat frame. Notice that the toggle bit doesn't change during the repeats. That's how you detect separate keypresses. If the toggle bit has changed then you know it has been a press and release. If the toggle bit doesn't change then you know that the button was held down. Even though you are pressing the button very quickly, you're remote just decides it can go ahead and send multiple copies of the code. It's not an issue with the library. It's just the way your remote works.

jkanasu commented 6 years ago

I agree with your assessment. I assumed the remote would not generate code twice, may be it is generating. The next troubleshooting step is to use as oscilloscope to observe the waveforms generated by the IRreceiver (hardware). Till then there is no reason to believe it is a IRLib issue.