Thirdly, at bottom right you see pins PB2, PB4, PB3 & PB5 whereas on the board they are named 10 to 13. Why are the PB designations out of order?
Finally, the Pins PC0 to PC3 are, on the board A0 to A3. Hmmm!
I guess all these different naming systems are a result of Arduino being Open Source so to speak. But it does make things very confusing for a rank beginner like me.
The weird naming is because they are pin names taken from the microcontroller on the pcb
Inside most microcontrollers the pins will be broken up into “ports” generally sized by the architecture of the device.
E.g. this 8 bit micro would have 8 pin groupings. Not all pins of this port may be broken out for a given package. And due to constrains when the IC was laid out, they may not be in order either
So PB3 would be port B, pin 3
Pins can have more than 1 function. E.g. an interrupt. A signal to tell a micro to stop what its doing and attend to something right now. This is where INT0 etc come from. AIN is likely an analog comparitor peripheral, and OC are likely pwm output pins. “Output counter A pin 1”
There are some very helpful and clear diagrams of pinouts for a whole range of boards and processors on this site. I have several of these laminated for reference. http://www.pighixxx.net/pinoutspg/boards/
I have been using AVR’s about 10+ years before arduino existed and to me those arduino numbers are gibberish. Names like “PB2” can be directly found in the datasheets of the atMEGA328P.
As you’ve probably already found out the names between braces are of the “alternative” functions of the microcontroller pins, which are also described in the datasheet.
The arduino numbering is an attempt to make the “arduino” boards “independent” of the hardware used on the boards. Some of the arduino’s use an atMEGA328, others use atSAM3, and yet others such as the maple mini use an STM32. With such widely different microcontrollers it is not possible to use the pin naming scheme from the manufacturers, and arduino (unfortunately) chose to invent their own.
And then later somebody had the bright idea to make the colorful pinout flyers that @John_Pateman points to for all those different boards which is a sort of handy compromise after the original standards had been fouled.
The whole pin numbering of arduino is flawed and pretty dumb (apart from the abdominal digitalWrite()).
Long before arduino it was standard to give pins a logical name in the software such as “LED_RED” or RELAY_A" and then map those names to actual hardware ports, partly to make it possible/easy to re-map stuff if needed, but also because you can easily do a search for those names in a decent IDE.
Do a search for “LED_RED” and you will find all references to that led.
In arduino do a search for “13” and I have no idea what you get.
Those are called “magic numbers” and should never be used in writing software.
Unfortunately arduino seems to have become the standard for teaching very mediocre habits to newbies.
I can remember when I first started programming Arduino (it wasn’t all that long ago and I started from zero). I wanted to create an header file so that I could have one receptacle for data type definitions and some common routines (standard Software Engineering practice). All hell broke loose because of the rule that one sketch (why are the not called programs like similar things in the rest of the programming universe) must reside in its own folder which must be of the same name.
I got the impression that there was a lot of wheel re-invention taking place at the time.