Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiver or decode problem #108

Open
SefaGeleri opened this issue Aug 11, 2021 · 2 comments
Open

Receiver or decode problem #108

SefaGeleri opened this issue Aug 11, 2021 · 2 comments

Comments

@SefaGeleri
Copy link

For my project I need to take 6 IR signals and assign it in a array while printing the results in serial monitor.
` uint8_t j = 0;

while(j < 6)
{
if (receiver.getResults()) //check if IR sensor receiving or not
{
decoder.decode(); //start decoding
decoder.dumpResults(true); //print decode results to serial prot scrren for debugging
buttonValue[j] = decoder.value;
receiver.enableIRIn();
delay(2000);
j++;
}
}`

When I use dumpResults with true input program works just right. But when I use dumpResults with "false" input my code takes the first signal twice as seen in the screenshot.

Ekran görüntüsü 2021-08-11 134613

I tried to look library files but I did not understand why changing input of dumpResults function effects the decoding the signal input.

I am using Arduino Mega and 1838T IR receiver.

Thanks

@SefaGeleri
Copy link
Author

In the screenshot I only pressed the remote button once but I see the signal value twice and it just do this for first input, other inputs works fine.

@SefaGeleri
Copy link
Author

My experiments show that when we use enableIRIn function right after dumpResults function it prints signal values twice, sometimes even more. My idea is we need to give a short delay after dumpResults to call enableIRIn. That way program finishes the processing signal datas and works properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant