// Include the Arduino digital I/O library
//#include "Arduino.h"

// Define the pin number
const int buttonPin = 6;

void setup() {
  // Initialize serial communication
  Serial1.begin(9600);
  Serial1.print("Button state: ");

  // Set the button pin as an input with a pull-up resistor
  pinMode(buttonPin, INPUT_PULLUP);
}

void loop() {
  // Read the button state
  int buttonState = digitalRead(buttonPin);

  // Print the button state to the serial connection
  Serial1.print("Button state: ");
  Serial1.println(buttonState);

  // Delay for 100 milliseconds
  delay(100);
}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT