Go Down

Topic: arduino micro digital pins (Read 952 times) previous topic - next topic

Hi,

I am a total noob so bare with me please. i just purchased an arduino micro and would like to use 15 digital pins as sensor I/O. The product page says that is has 20 digital I/O's but when i look at the pinouts it only lists pins 0-13 (assuming that i can use the TX and RX as digital pins 0 and 1). so what pins are the other digital pins? and can i define them like i would normally, like as in pin 14? or can i even define 15 digital I/O's on the Micro? any information helps. thanks!

fungus

The "analog" pins work for digital I/O as well.

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

CrossRoads

Yes, A0 to A5 can be called out as D14-D19.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Hi,

oh, ok. so in the sketch do i define it as D14 or just 14

EXAMPLE:
    #define LED D14
or
    #define LED 14

Thanks


fungus


Hi,

oh, ok. so in the sketch do i define it as D14 or just 14

EXAMPLE:
    #define LED D14
or
    #define LED 14

Thanks


Neither. Use "A0", "A1"...etc
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

CrossRoads

@fingus,
Why would you use

#define LED A0
vs
#define LED 14
?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

fungus


@fingus,
Why would you use

#define LED A0
vs
#define LED 14
?


Because that's what's printed on the PCB.

Would you know where pin "14" was just by looking at an Arduino Uno?
No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Go Up