digitalRead influenced by touches const int BUTTON      = 8;


void setup() {
  Serial.begin(9600);
  pinMode(BUTTON, INPUT);
}



void loop() {

  Serial.println(digitalRead(BUTTON));

}


I have connected a cable to pin 8. It's not connected to anything else nor have I any other cables connected.
I am expecting constant zeros, but I keep getting ones and zeros all the time, e.g. when shortly touching the cable.

I didn't experience that before. Did I accidentally damage my Arduino?
The pin is floating. Use pull up or pull down to help define its logic state.