Arduino Forum

Using Arduino => LEDs and Multiplexing => Topic started by: Wolven1992 on Jul 09, 2013, 02:27 pm

Title: arduino micro digital pins
Post by: Wolven1992 on Jul 09, 2013, 02:27 pm
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!
Title: Re: arduino micro digital pins
Post by: fungus on Jul 09, 2013, 02:45 pm
The "analog" pins work for digital I/O as well.

Title: Re: arduino micro digital pins
Post by: CrossRoads on Jul 09, 2013, 03:02 pm
Yes, A0 to A5 can be called out as D14-D19.
Title: Re: arduino micro digital pins
Post by: Wolven1992 on Jul 09, 2013, 03:09 pm
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

Title: Re: arduino micro digital pins
Post by: fungus on Jul 09, 2013, 04:29 pm

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
Title: Re: arduino micro digital pins
Post by: CrossRoads on Jul 09, 2013, 05:01 pm
@fingus,
Why would you use

#define LED A0
vs
#define LED 14
?
Title: Re: arduino micro digital pins
Post by: fungus on Jul 09, 2013, 05:12 pm

@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?