I seem to have an issue where by if I do a digitalRead on pin 8, if I don't have anything connected to pin 8 it reads low however as soon as I connect a cable without anything attached, thats right a wire with nothing on the end the Arduino reads high.
My code is as follows
val = digitalRead(8);
if (val == 1)
{
Serial.println(val);
}