digitalWrite(), digitalRead(), and pinMode() use the Arduino pin numbers or, for the Analog Input pins that can double as digital I/O pins, the analog input pin name:
A0-A5 have digital pin numbers, too, but they are different for different models of Arduino. On the UNO they are called 14 through 19 but on the MEGA they are up in the 50's and on the Leonardo they start somewhere around 18. Best to use the names (A0-A5) so your sketch works on other models of Arduino.
analogRead() can use the names (A0-A5) or the analog pin numbers (0-5).
The bar at the top of the forum page has links, Home Buy Download Products Learning, etc.
Click on Products then find your board and click that. Somewhere in that page you should find a link to a pin map for the chip and board that will let you map between the two.
As you get more into Arduino, surf the site itself and bookmark sections to make easy lookup later.
slowjourney:
... and I'm having trouble figuring out what pin names to use.
Me too!!! Even on this date 24 May 2020!!
I have been hunting the various Arduino Micro documentation and reference sites and was not able to find this info until I found this forum thread. This info SHOULD BE at an easy to find spot.
Perhaps on the hardware pin diagram page, PLEASE (for all Arduino models).
I have been hunting the various Arduino Micro documentation and reference sites and was not able to find this info until I found this forum thread. This info SHOULD BE at an easy to find spot.
Perhaps on the hardware pin diagram page, PLEASE (for all Arduino models).
What is the question? If you're complaining about a lack of pin diagrams, you're mistaken, they are available on site.