-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Description
This is Issue 244 moved from a Google Code project.
Added by 2010-05-06T18:19:36.000Z by dmel...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).
Original labels: Type-Enhancement, Priority-Medium, Component-Core, Milestone-0019
Original description
What change would like to see?
The additions of #define's or consts for the analog input pins. That is, A0 would have the value
14, A1 would be 15, etc. Then analogRead() would take either 0 or A0, 1 or A1, etc.
Why?
So we can do:
digitalWrite(A0, HIGH); // enable a pullup
analogRead(A0); // read from the pin
Or, potentially (if we add it):
pullup(A0);
analogRead(A0);
Would this cause any incompatibilities with previous versions? If so, how
can these be mitigated?
The analogRead() functions need an extra check to accept either 0 or A0, but I don't think it will
hurt anything.