My Arduino NANO sketch is really very simple and uses only one digital input and three digital outputs. I've been using only pins A0, A1, A2, and A3 and everything works. I wanted some experience using the digital pins, particularly to learn how to declare them, and breadboarded this simple sketch:
It compiles and uploads OK. I hung a voltmeter on pin D9 to monitor voltage swings. No signal. I checked several other digital outputs on either side of D9, no signal. I modified the sketch and tried a half dozen different pins. No dice. I know I'm making some stupid mistake and I won't blame you if you're too disgusted to help.
That's part of the problem. I don't understand why the D pins have numbers too. Many tutorials talk about this pin and that pin, but I can't tell if they want to refer to one of them as "D9" or "12".
We have also A0, A1, ..., A5 markings on the NANO Board. Why?
We need to know that:
The marks D0 - D13 marks refer to 0 (Digital Pin-0) - 13 (Digital Pin-13) respectively.
The A0 - A5 marks refer to 14 (Digital Pin-14) - 19 (Digital Pin-19) respectively.
The Arduino Compiler knows the meanings of the digital pins as --
0 - 7 for PD0 - PD7 (Port Pins of PORT D of the MCU)
8 - 13 for PB0 - PB5 (Port Pins of PORT B)
14 - 19 as PC0 - PC5 (Port Pins of PORT C)