Hi
in one recent experimental project i had to use most of the pins of Arduino pro mini..
i used all the I/O pins and Analog also (used them as I/O)
Half of them used them as I/O inputs (INPUT_PULLUP) and the other half as OUTPUT to drive led diodes
the concept was to push each button and turn on the led (easy task for a begginer )
i used the Pin : 13 as input
while i was using the arduino pro mini conected with the usb cable to read and serial monitor also.. everything worked fine
when disconnected the cable and used an external power supply something weird happened.
Led that supposed to be opened by Pin13 was always on..
the same when i had the external power supply on and connected the usb cable.
the serial print was giving me the message that pin13 was active (like i was pressing the button)
button switches and all connections was checked more than one time and were fine.
so at the end i used the last spare pin that i had (A3=17) and moved the the button there
after that everything worked fine with or without external power supply
i guess that something has to do with the pin13 that has by default the led in the Arduino board
So the question is :
if i want to use pin13 as input in the future is any special command that have to place in my code in order to use it ?
Thanks in Advance