I recently come across a situation where it would be convenient to have a few additional LED status outputs, for example double color indicator LED's
Typically I use two outputs, however if i could set the pin to a high impedance status I would be able to have an active low LED, active high LED or both LED's off.
For this particular circuit I need to use some existing LED outputs and replace the original LED's with bi-color ones, therefore no circuit modifications.
I currently set the pin as an input to turn the LED off, but wondering if there was a more logical way.
I'm not sure if you can call it charlieplexing with only one line! When charlieplexing using N outputs, you can drive N × (N - 1) leds. If N is one, that's zero leds.
I'm also not sure your idea would work as you intend. Sure, OUTPUT/HIGH would light one led and OUTPUT/LOW would light the other, but INPUT might cause both leds to light dimly, because current would flow through both leds and their series resistors from 5V to GND.
This could be avoided if the forward voltages of the two leds added up to more than 5V, for example two blue or white leds. But for red, green etc both leds would light dimly I suspect.