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

irremote not working properly using Arduino Uno #412

Open
LeonardsonCC opened this issue May 10, 2022 · 5 comments
Open

irremote not working properly using Arduino Uno #412

LeonardsonCC opened this issue May 10, 2022 · 5 comments

Comments

@LeonardsonCC
Copy link

Hey,
I'm new to embedded stuff, so maybe I have made some mistake.

Trying to make the IR Remote driver to work using an Arduino Uno, it just not received any signal.
Debugging the driver code, I notice that if I use the Pin Mode as Input, and change the SetInterrupt to just call pinChange each 10 milliseconds, it receives the controller inputs.

There's any reason for the SetInterrupt and the Pin Mode as InputPullup to not work on Arduino Uno?

Checking Arduino docs, the pins 2 and 3 should be working, right?

@neildavis
Copy link
Contributor

Hi @LeonardsonCC which IR receiver component are you using with the Uno? Can you provide the part number and/or link to the datasheet? Thanks.

@LeonardsonCC
Copy link
Author

Hi, I believe it is this one: http://eeshop.unl.edu/pdf/VS1838-Infrared-Receiver-datasheet.pdf

@neildavis
Copy link
Contributor

Thanks. If I'm reading that datasheet correctly, it's an 'active low' device so the driver config should be compatible. I have a R3 Uno somewhere so will try it soon once I have done some maintenance on my tinygo setup. I'm assuming you were using tinygo v0.23 at the time of reporting?

@neildavis
Copy link
Contributor

Ah, having got the dev env setup, now I see. It seems SetInterrupt() is not implemented in machine.Pin for arduino target, which is more of a tinygo core support issue than a problem with the driver per se. That is a shame though, since as you point out the hw support is there on some pins at least.

I'd suggest opening an issue on the tinygo core similar to this one to ask for arduino/avr support for GPIO interrupts. You're possibly more likely to get a better response over there on why it's not available and/or possible.

@LeonardsonCC
Copy link
Author

Oh, got it. Thanks for the really helpful explanation.
I'll create the issue!

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

2 participants