SparkFun Forums 

Where electronics enthusiasts find answers.

For the discussion of Arduino related topics.
By Kalagaraz
#114455
What would happen if I used an output pin as an input? Let's say I want to make double LED matrix. Since LEDs are diodes, I could basically put 2 LEDs per matrix cell and face them opposite directions. Like say Row 15 pin is +5v and Column 15 pin is 0V an LED will light, I then switch them Row 15 pin 0v and Column 15 pin +5v, the other LED lights. Will this damage the arduino? having +5v come into a pin set as an output?
By Liencouer
#114463
I think you may be confusing direction of current flow and IO pin direction.

An IO pin can source current, as in when the IO pin = 5V and is connected to ground through a resistor, the current flows out of the IO pin to ground.

An IO pin can also sink current, as in when the IO pin = 0 connected to 5V through a resistor. In this case, the current flows through the resistor into the IO pin.

In both cases, the IO pin is configured as an output.

Take a look at Charlieplexing - Complementary Drive. It sounds like it is about what you are trying to accomplish.