Skip to content

Avoid to have first analog pin value (A0) lesser than NUM_ANALOG_INPUTS #214

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
Feb 1, 2018

Conversation

fpistm
Copy link
Member

@fpistm fpistm commented Jan 31, 2018

To be able to use analogRead(A0) and analogRead(0), A0 pin value
must be greater than or equal to NUM_ANALOG_INPUTS.
Ex:
If NUM_ANALOG_INPUTS was 6 (A0 to A5) and A0 was defined to 3 (D3),
analogRead(A0) would read A3 instead of A0.

To be able to use analogRead(A0) and analogRead(0), A0 pin value
must be greater than or equal to NUM_ANALOG_INPUTS.
Ex:
If NUM_ANALOG_INPUTS was 6 (A0 to A5) and A0 was defined to 3 (D3),
analogRead(A0) would read A3 instead of A0.

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm fpistm self-assigned this Jan 31, 2018
@fpistm fpistm added this to the Next release milestone Jan 31, 2018
@fpistm fpistm merged commit f9e1d01 into stm32duino:master Feb 1, 2018
@fpistm fpistm deleted the Analog_hardening branch February 1, 2018 09:16
@fpistm fpistm modified the milestones: Next release, 1.2.0 Mar 15, 2018
benwaffle pushed a commit to benwaffle/Arduino_Core_STM32 that referenced this pull request Apr 10, 2019
Avoid to have first analog pin value (A0) lesser than NUM_ANALOG_INPUTS
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.

1 participant