Differentiate between A3 and D3 in code

This might be a stupid question, but I can't seem to find the answer.

I have a Pro-Mini 16MHz from Sparkfun. I'd like to use all of the pins, but I'm confused about how I would define the use of both the A3 and D3 pins. I know I can't just say pin 3 right?

For example:

I can do analogRead(3) and that's A3 right? Can't I also do digitalRead(3) and that be D3?

I can do analogRead(3) and that’s A3 right? Can’t I also do digitalRead(3) and that be D3?

Yes, that is correct the analogread and digitalread functions know which pin 3 to use, A3 or D3 respectively.

Lefty

OK, that part make sense. But what if I want to use A3 as a digital IO pin?

Then you use the following from the Arduion reference section:

"The analog input pins can be used as digital pins w/ numbers 14 (analog input 0) to 19 (analog input 5). "

so using:

pinMode(17, INPUT); val = digitalRead(17);

Will allow the A3 pin to be used as a digital input pin.

Lefty

Sweetness. Thanks a bunch. What section was that under?

http://arduino.cc/en/Reference/DigitalRead