analog pins vs inpu/output pins


this might be a dumb question but here goes

if i use tha analog read pins do i lose the corresponding pin on the input-output range ,

and if not how does the software ake the difference between for instance "pin 2" and "analog-read2" ?

greetz & thanks


Analog pin 2 is a different pin from digital pin 2. You can use the analog pins as digital inputs - analog pin 0 is digital pin 14, analog1 is digital 15 etc.

All the pins are digital by default but the analagRead function configures the corresponding pin for analog input when the function is called.

See the Arduino reference for more information on the arduino board and its pins.