#include "pico/stdlib.h"
#include <stdio.h>
int main() {
stdio_init_all();
const uint BUTTON_PIN = 14;
gpio_init(BUTTON_PIN);
gpio_set_dir(BUTTON_PIN, GPIO_IN);
gpio_pull_down(BUTTON_PIN); // Important!
while (1) {
if (gpio_get(BUTTON_PIN)) {
printf("Pressed\n");
} else {
printf("Released\n");
}
sleep_ms(200);
}
}