-
Notifications
You must be signed in to change notification settings - Fork 2k
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
drivers/ir_nec: NEC remote receiver implementation #17935
Conversation
please provide |
Thank you for the feedback, I just added a few commits that should address all the issues you mentioned. Please let me know if there's anything more I should change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still would prefer this using ztimer.
other than that there are these nitpicks.
the PR tested succsessfully
It should be good now, I applied the changes you suggested and moved from xtimer to ztimer. I also tested again on the hardware to make sure that everything works and found no problems in doing so. |
looks good to go, please squash |
I squashed the changes down to 3 commits, trying to keep different areas (drivers/ and tests/) in separate commits - do you want me to squash everything in a single one? |
lets wait for murdock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sadly Murdock seems not to like specific defaults therefor: Use GPIO_PIN(0,0)
for fallback
it ok if you squash this change right into the: |
Thank you for the help! It should be good now, let's see what Murdock thinks of it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one minor change
and
please move the documentation change in ir_nec_constants.h from the test commit to the driver commit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works, reads well, tests well
Contribution description
This PR adds support for decoding packets sent by infrared remotes using the NEC protocol. I tested this code with an HS0038B receiver, which outputs a demodulated and inverted signal (the inversion seems to be quite common, but I haven't done an extensive search on this).
Testing procedure
Board setup
Connect +3v3 and GND to the chip, and its output pin (which needs a capacitor and 1/2 resistors, see page 2 here ) to an interrupt-capable gpio input. I am using this module and a b-l475e-iot01a board
Code
The following receives and prints decoded packets
Issues/PRs references
See #17906 for the initial issue on this feature