Skip to content

spresense: return the correct value for Analog In #4294

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
Mar 1, 2021

Conversation

kamtom480
Copy link

Return the correct value in the range 0 to 65535 for Analog In.

Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

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

Looks fine, no testing performed.

@tannewt tannewt merged commit 1b3bca1 into adafruit:main Mar 1, 2021
@dhalbert
Copy link
Collaborator

dhalbert commented Mar 1, 2021

@kamtom480 I tested this build on a Spresense, and on A0, I get 512 connected to ground and 42304 or so when connected to 3.3V. Is this expected? The IO voltage jumper is set to 3.3V. 3.3/5 is 0.66 and 42304/65535 is ~0.6455, so that would be expected if 5V was full-scale. On our own boards 3.3V is 65535 full-scale.

@kamtom480
Copy link
Author

@dhalbert See my other PR: #4310

For pins on the extension board, 5V is 65535 full-scale. Is that a problem?

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.

4 participants