Like the LED on PIN 13 that turns ON when that pin is set to OUTPUT, I am looking for a way to have a LED that turns ON when that pin is set to INPUT. My idea is to have the reverse of the PIN 13 LED which is currently:
PIN 13 --> 1k resistor --> LED --> GND
to the following for it to turn on when it is set to INPUT:
PIN 13 <-- LED <-- 1k resistor <-- +5V
but there is a problem: as it is waiting for an input, the LED would be constantly ON and it could be mistakenly taken as an INPUT signal :(. What can I do so that I can have both LEDs but one of them turns on when a signal is going out and the other when a signal is going in without affecting the signals?
to the following for it to turn on when it is set to INPUT:
PIN 13 <-- LED <-- 1k resistor <-- +5V
That just changes the LED for a current source drive to a current sink drive.
There is nothing electrically different at the pin, when it is being driven by an input device, to a pin driving an output device. So therefore you can't implement what you want. Sorry.