High signal with wire disconnected!!?

timcastelijn:
allright thanks,

however I am wandering whether I stated the problem right:
when I connect one end of a jumper cable to the output the digitalRead value changes. it changes back when i disconnect it. The other end of the cable is not connected at to anything. It seems i'm using a loose wire as a button.

anyway thanks for the advice, I'll look it up.

cheers

Let me put it in the form of a question to you. What value do you expect to read from a digital input pin that has nothing wired to it?

The answer is there can be no valid expectation as a floating input pin is just reading random external and internal electrical noise and will randomly read high or low and change on it's own as the phase of the moon changes or how hard you stare at the pin.

Lefty