Button status HTCC-AB01

I’ve been trying to read the status of a button on GPIO1 for a while now, but I can’t. Maybe I’m making a mistake, can someone help me and tell me what I’m doing wrong with the sketch below?

#define BUTTON_PIN GPIO1

void setup() {
  Serial.begin(115200);
  pinMode(BUTTON_PIN, INPUT_PULLUP);
  pinMode(Vext,OUTPUT);
  digitalWrite(Vext,LOW);
}

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

Use a multimeter to measure whether the pin level has changed.

I just uploaded your sketch (straight cut & paste, with an added print statement to tell me what buttonState was actually being read) to an AB01_V2 board and it seems to work fine for me—I am just connecting/disconnection the GPIO1 and GND pins on the board. Is your button connecting GPIO1 to Ground?

Your comment regarding GND turned out I was mistaken. Not VEXT but GND had to be connected to GPIO1. So I was wrong.

Thanks for your help UniquePete and Navi!