As a new starter I found three problems with pins numbering for the Arduino Uno :
1- The first header on the board contain pins 0-7, and the second header contain pins 8-13, but the pins in the two headers is a mixture of Digital and PWM together.
2- The page that describe the function analogRead() says:
pin: the number of the analog input pin to read from (0 to 5 on most boards, 0 to 7 on the Mini and Nano, 0 to 15 on the Mega)
, and gives an example of using
int analogPin = 3;
val = analogRead(analogPin);"
, but in pages pinMode() , digitalWrite() , digitalRead() they use the form Ax to use the analog pins
A0-A5
, and so do all the examples !!!
3- If I want to make my sketch portable for the different Arduino boards, I have to know the pin numbers and functions for each board, is there is a place that can tell me so ?
Thanks for all.