Arduino Nano board has 14 digital IO (D0-D13), but we leave D0 and D1 unused since we don’t want to interfere with the TX-RX communication in the firmware uploading process (handled by the bootloader program), so the available digital IO is now 12. In the design of digital soldering station, the required digital output pins for the display and the opto driver is 11, so only 1 pin is left for other purpose. Because we need two key/switch (for setting up the temperature reference using up and down buttons), we decide not to use this 1 digital IO pin the analog input A0 and A1. When not all of the analog inputs are needed, each of analog input pins can be configured as digital IO [reference 1]. Key or switch button interfacing in Arduino is very simple, as it need is just a grounding of the digital input pin. In the figure 1 is shown that the key/switch interface has external pull-up resistors. The external pull-up resistors R12 and R13 are optional, since analog input has internal pull-up as well (like the other digital IO).
Back to the main topic: