Skip to content

Return polarity to False. #5

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

Merged
merged 1 commit into from
Oct 20, 2022
Merged

Conversation

kattni
Copy link
Contributor

@kattni kattni commented Oct 19, 2022

Interrupt pins are meant to pull low when active. Turns out the solution is to wire the LED to 3.3V instead of ground, not to alter the polarity.

@kattni kattni requested a review from a team October 19, 2022 23:11
Copy link
Contributor

@KeithTheEE KeithTheEE left a comment

Choose a reason for hiding this comment

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

Reading through the docs on for the chip page 22 the wording of this pin isn't clear to me (which I think is a large reason this setting is confusing)

Since I don't have the device I can't test it, so instead I'll have to ask you:

If the interrupt polarity is set to Low (False), does that me the pin is High until the interrupt triggers and it dips low?

Similarly, when the interrupt polarity is set to High (True), is the pin Low until the interrupt triggers?

@kattni
Copy link
Contributor Author

kattni commented Oct 20, 2022

@KeithTheEE Thank you for the thoughtful review! Good thinking, checking the datasheet, but it's pretty useless regarding this topic. Carter and I went through it yesterday while troubleshooting this whole situation, and found nothing helpful.

You are exactly correct. The interrupt remains high until it is triggered, and then dips low. This is evidently exactly how it should work, and how most interrupt pins in this type of situation work. I imagine the ability to configure it was added for customisability, but it defaults to this behavior because that is the "expected" behavior.

The problem was, I had the LED wired to GND, so it was not acting in the way I thought it should, and I assumed the thing that had to be altered was the software. This is not the case, and when it's wired to 3V, it works properly with the script as it was to begin with.

Copy link
Contributor

@KeithTheEE KeithTheEE 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 the clarification!

That pin setting strikes me as strange so that helped me understand what was going on.

Looks good to me!

@KeithTheEE KeithTheEE merged commit 00097f8 into adafruit:main Oct 20, 2022
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants