1

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

4

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.

2
  • So you're saying its = A0, = A1, = A2, etc... or are you saying its just = 0, = 1, = 2, etc?
    – StealthRT
    Sep 30, 2015 at 2:44
  • Analog pins in the Arduino libraries are prefixed with "A". Sep 30, 2015 at 3:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.