I have been trying to run a sketch written for the Uno on a M0 Pro board and just realized that the pin mappings of the A0-A5 pins are not identical between the two boards. On the link Arduino Playground - Pins it says that the mapping of A0 is Pin 14, but on the M0 Pro it is Pin 24.
For me, the code for the Uno:
pinMode(14, OUTPUT);
digitalWrite(14, HIGH); // turn the LED on (HIGH is the voltage level)
has to be changed to
pinMode(24, OUTPUT);
digitalWrte(24, HIGH); // turn the LED on (HIGH is the voltage level)
Maybe it's better to be using the alias for the pins instead. This code also seems to work:
pinMode(A0, OUTPUT);
digitalWrte(A0, HIGH); // turn the LED on (HIGH is the voltage level)
I have been searching for a document describing these mappings for the M0 Pro. Do you know where I can find this? I would then like to update the page Arduino Playground - Pins with these mappings.