Low state - detection switch

I have a simple program which works fine, but I cannot find if it is acceptable to use in this manner after reading a lot of articles titled "XX ways to kill your arduino".

For simplicity sake, what I have done is set up an output pin (which defaults to LOW condition) and a input pin which has been set to pullup mode.

These two pins are now connected via a momentary switch. (No resistor)

Input pin is normally HIGH, due to the internal pull up resistor in the arduino.

When the switch is depressed the input pin is brought LOW by the output pin.

All references and guides that I have read say to either set output pin high, or hook up to a 5V supply and run a switch with a resistor, but the method I have used has been done to keep unnecessary current draw down to a minimum.

Obviously if i switched my output pin high it would short out between the two pins and destroy them, but are there any reasons why I shouldn't keep with the way I have done it?

HIGH, LOW, it depends on the external circuitry that you have.

I would say, a normally closed switch connected to GND does help prevent spikes from damaging inputs. IMO

.

Why would you use an output pin to change the state of an input pin.
This is normally done in code.

State your problem, not the answer you think is right.
Leo..

I am not using output pin to change the state of an input pin.

I am effectively setting up the output pin as an earth, IE LOW state.

Then I am setting up my input pin as pull up.

When in operation input pin is HIGH when the normally open switch is not pressed, when depressed input pin goes LOW. This provides me funtionallity of the switch i require, without the extra current draw of suppling 5V to the switch with a resistor in series to limit the current flow.

My question is, will doing this cause damage to my arduino? Image attached of “circuit” in question, there are NO external resistors, only the pullup resistor applied to input pin.

"without the extra current draw of suppling 5V to the switch with a resistor in series to limit the current flow."
Inputs are 100meg
What extra current flow?

Fair enough in regards to your comment larryd, but if you disregard my reasoning is there anything wrong with doing what I am suggesting?

ninja_drift:
Fair enough in regards to your comment larryd, but if you disregard my reasoning is there anything wrong with doing what I am suggesting?

No there is nothing wrong with what you are suggesting only that it seems to be a bit of a waste of an output pin.

Understood. Indeed nothing wrong with that.
Is this switch manually pressed?
You must have a reason to save the ~200uA or so pull up current.
Leo..