I am a little confused about the pin functions setup. Which "pin" numbers do i use in the programming ? is it the pin mumbers on the board ? so am i using A0 as a pin "number" if I'm working on it.
Can the analog in's be used for anything else ? Are all of the pin function types fixed or can i make them go to whatever i want providing the ATmega supports that functionality on that pin ?
The pin numbers used in the functions refer to the numbers on the Arduino board so
pinMode(9, OUTPUT);
digitalWrite(9, HIGH);
both refer to pin 9 on the board.
The analogue pins A0 - A5 can be used as digital pins and can be referred to by their 'A' alias like this
pinmode(A0, OUTPUT);
Some pins have other capabilities, particularly the ability to output a PWM signal using analogWite(). On the UNO board these PWM pins are marked with a ~
In general you should avoid using pins 0 & 1 as these are used by the hardware serial but can be used if you are not doing any serial input or output.
Some of the pins also have other functions, such as use with SPI.