Skip to main content
Rollback to Revision 1
Source Link
gre_gor
  • 1.7k
  • 4
  • 18
  • 30

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?

correct way

#define analog1 A0;
#define analog2 A1;
#define analog3 A2;
#define analog4 A3;
#define analog5 A4;
#define analog6 A6;
#define analog7 A7;
#define analog8 A8;
#define analog9 A9;
#define analog10 A10;

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?

correct way

#define analog1 A0;
#define analog2 A1;
#define analog3 A2;
#define analog4 A3;
#define analog5 A4;
#define analog6 A6;
#define analog7 A7;
#define analog8 A8;
#define analog9 A9;
#define analog10 A10;

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?

added 267 characters in body; added 1 character in body
Source Link
StealthRT
  • 259
  • 2
  • 8
  • 16

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?

correct way

#define analog1 A0;
#define analog2 A1;
#define analog3 A2;
#define analog4 A3;
#define analog5 A4;
#define analog6 A6;
#define analog7 A7;
#define analog8 A8;
#define analog9 A9;
#define analog10 A10;

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?

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?

correct way

#define analog1 A0;
#define analog2 A1;
#define analog3 A2;
#define analog4 A3;
#define analog5 A4;
#define analog6 A6;
#define analog7 A7;
#define analog8 A8;
#define analog9 A9;
#define analog10 A10;
Source Link
StealthRT
  • 259
  • 2
  • 8
  • 16

Arduino Pro Micro Analog Pinouts

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?