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

void loop()
{
  byte buttonState = digitalRead(2);
  
  if (buttonState == LOW) {
      Serial.println("Button is pressed");
  }
  else {
      Serial.println("Button is not pressed");
  }
  delay(100);
}