Unconnected pins are "floating" and will read high and low randomly.
http://www.cmiyc.com/tutorials/arduino-pull-ups/
Use the internal (or external) pull ups to fix it.
Unconnected pins are "floating" and will read high and low randomly.
http://www.cmiyc.com/tutorials/arduino-pull-ups/
Use the internal (or external) pull ups to fix it.