recognize if a led is connected on a digital out

If the led has it's cathode lead wired to ground then you could just run a wire from the anode lead of the led to a analog input pin. It will read the Vf voltage value of the led when it's on and 0 when it's off.

Lefty

Lefty