I have the Arduino Pro Micro and I would like to use all the analog pins that I can on it.
It currently looks like it has a total of 9 Analog pins that can be used. enter image description here
A0, A1, A2, A3, A6, A7, A8, A9 and A10.
However, I am unsure how to call these pins since all of those are also digital pins.
Would A0-A3 be defined as:
#define analog1 A0;
#define analog2 A1;
#define analog3 A2;
#define analog4 A3;
While the other pins would be this?:
#define analog5 4;
#define analog6 6;
#define analog7 8;
#define analog8 9;
#define analog9 10;
Then just call:
analogRead(analog1);
analogRead(analog2);
.....
analogRead(analog8);
analogRead(analog10);
Would that be the correct way of defining the 9 analog pins?
1 Answer 1
Assuming you have the Pro Micro core, they are called A0, A1, A2, A3, A6, A7, A8, A9 and A10. There is no need to "special case" the others, since the pins are known as both.
-
So you're saying its = A0, = A1, = A2, etc... or are you saying its just = 0, = 1, = 2, etc?StealthRT– StealthRT2015年09月30日 02:44:03 +00:00Commented Sep 30, 2015 at 2:44
-
Analog pins in the Arduino libraries are prefixed with "A".Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams2015年09月30日 03:11:14 +00:00Commented Sep 30, 2015 at 3:11
Explore related questions
See similar questions with these tags.