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

IR learning guides have ones and zeros swapped #2813

Merged
merged 8 commits into from
Jun 3, 2024
Merged

IR learning guides have ones and zeros swapped #2813

merged 8 commits into from
Jun 3, 2024

Conversation

bradanlane
Copy link
Contributor

There are several CircuitPython learning guides related to IR. When tested them, they produced "2's compliment" results. I discovered the transmit examples had reversed the values for a "0" vs a "1".

To verify, my observation, I reviewed the sample code from the irremote CircuitPython library. The library code has the correct values for "0" and "1".

This pull request makes that corrections for the learning guides.

The learning guide changes were run on a Raspberry Pi PICO with the Adafuit IR Emitter module and the IR Receiver module

bradanlane added 5 commits May 5, 2024 09:55
the list values for ONE and ZERO are swapped from what is described in the Adafruit_irremote.py library. This error causes the receiver to get the one-s compliment of the expected data.
the list values for ONE and ZERO are swapped from what is described in the Adafruit_irremote.py library. This error causes the receiver to get the one-s compliment of the expected data.
the list values for ONE and ZERO are swapped from what is described in the Adafruit_irremote.py library. This error causes the receiver to get the one-s compliment of the expected data.
the list values for ONE and ZERO are swapped from what is described in the Adafruit_irremote.py library. This error causes the receiver to get the one-s compliment of the expected data.
Correct CircuitPython IR ?learning guides to match irremote library example
Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. It essentially completes the corrections done by @tkomde in adafruit/Adafruit_CircuitPython_IRRemote#68 and adafruit/Adafruit_CircuitPython_IRRemote#69.

I'll review the guides text and change as needed.

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some discord discussion: the library uses 560 instead of 550 and its header values are [9000, 4500]. @bradanlane will retest.

@bradanlane
Copy link
Contributor Author

As suggested by @dhalbert, the IR Transmit learning examples have been updated to use header pulses of 9000,4500 and a mark pulse of 560.

Testing was done using the Raspberry Pi PICO with the Adafruit IR emitter and IR Receiver modules. Testing on Circuit Plaground Express was not conducted as I do not have hardware.

@bradanlane
Copy link
Contributor Author

embarrassing copy/paste error

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this, and your patience.

@dhalbert dhalbert merged commit e539fcb into adafruit:main Jun 3, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants