I am setting up an common cathode RGB LED as a status indicator for a small concept project. While I was setting up the prototype for testing, I noticed that when I run a 330 ohm resistor from VIN to the cathode and then connect a jumper wire from one of the legs of the LED to a digital I/O that isn’t configured, it sinks the current and acts like a ground and the LED lights up. Not what I had expected.
I have D7 configured as output and I get the same behaviour. I’m a little concerned as to the reasoning behind what seems like counter-intuitive occurrences.
Why is it doing this and what have I overlooked?