I wrote a sketch which reads and then writes inputs from the digital pins and I'm getting random high and low values( 1's and 0's)...even when just my USB is plugged in and the circuits are disconnected. I'm using an arduino.deicimila.
The problem is that when nothing is connected to a pin, it's not HIGH or LOW - it's somewhere in between, so the arduino will read it as a random high or low value.
You need to do a bit of reading of "pull down" or "pull up" resistors - try searching the arduino site & forum and ladyada's site and forum.
Thanks man. I did the ladyada tutorials, but I didnt quite understand the full impact of that one. Between the lesson and some resoldering my set up is working like a fine tuned machined.