Arduino Nano pin D13 usage

Hi i notice that when i try to use D13 in arduino nano as an input for my temperature sensor, it turns out that it is not able to have proper readout. it keep showing negative values and it does not respond despite touching the temperature sensor. But however when D12 or some other D pins in arduino nano is used, it is able to function properly.

may i know why is this so? and is there any possible ways for that specific D13 pin to work with the temperature sensor? because that pin or that particular position is an ideal pin for me to solder my temperature sensor to it, thus i wouldn't need to "reroute" or use longer wires to solder.

It is not such a good idea to use D13 as an input with an arduino Nano. D13 is connected directly to the built in LED (and resistor) of the board. In some situations this may cause problems.
Take a look at the schematics.
UNO and other boards use an opamp "between" D13 and the LED so you can use D13 as an input without problems but Nano does not.

Try to use another pin.
If there is no other way and you must use D13 for your sensor you can try to cut the connection to the LED or unsolder the LED or its resistor. (I would not do this and just use another pin). :slight_smile: