user63550: I have digital pin 7 when set to High it does and when set to low it does not.
The only way I can get consistent High or Low is to use a 2 position 3 pin switch with my pin 7 in the middle and ground on one side and 5v on the other.
Is there a way I can use an simple Open/Close switch and still get the same function?
As of not if I dont "pull" pin 7 to ground I get both open and close randomly.

user2881: Seems like you already found the solution. Without a pull-down of pull-up resistor, the voltage at pin 7 will float to some random voltage, when the switch is open. 
Either add an (external) pull-down resistor. Or flip things around and use the internal pull-up resistor inside the ATMega328p. Then connect the other side of the switch to GND. Whenever the switch is pressed, your digitalWrite gives you a LOW. 
To use the internal pull-up use pinMode(7, INPUT_PULLUP);

63550: <p>I have digital pin 7 when set to High it does and when set to low it does not.</p>

<p>The only way I can get consistent High or Low is to use a 2 position 3 pin switch with my pin 7 in the middle and ground on one side and 5v on the other.</p>

<p>Is there a way I can use an simple Open/Close switch and still get the same function?</p>

<p>As of not if I dont "pull" pin 7 to ground I get both open and close randomly.</p>
 2881: <p>Seems like you already found the solution. Without a pull-down of pull-up resistor, the voltage at pin 7 will float to some random voltage, when the switch is open. </p>

<p>Either add an (external) pull-down resistor. Or flip things around and use the <strong>internal</strong> pull-up resistor inside the ATMega328p. Then connect the other side of the switch to GND. Whenever the switch is pressed, your digitalWrite gives you a LOW. </p>

<p>To use the internal pull-up use <code>pinMode(7, INPUT_PULLUP);</code></p>
