#include "hardware/gpio.h"
#include "pico/stdlib.h"
#include <stdio.h>

const int LED_0 = 5;
const int BTN_0 = 15;

void btn_callback(uint gpio, uint32_t events) {
    printf("btn0: %d\n", gpio);
    gpio_put(LED_0, 1);
    busy_wait_ms(100);
    gpio_put(LED_0, 0);
}

int main() {
  stdio_init_all();

  gpio_init(BTN_0);
  gpio_set_dir(BTN_0, GPIO_IN);
  gpio_pull_up(BTN_0);
  gpio_set_irq_enabled_with_callback(
      BTN_0, GPIO_IRQ_EDGE_FALL, true, &btn_callback);

  gpio_init(LED_0);
  gpio_set_dir(LED_0, GPIO_OUT);

  while (true) {
  }

}
BOOTSELLED1239USBRaspberryPiPico©2020RP2-8020/21P64M15.00TTT