#include <cstdio>
#include "pico/stdlib.h"
#include "pico/cyw43_arch.h"

#ifndef RASPBERRYPI_PICO2_W
#error "Configure the SDK for Pico 2 W, not Pico or Pico W."
#endif

int main() {
  stdio_init_all();
  if (cyw43_arch_init() != 0) {
    while (true) {
      std::puts("CYW43 initialization failed: LED is not running");
      sleep_ms(1000);
    }
  }
  while (true) {
    cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, true);
    sleep_ms(500);
    cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, false);
    sleep_ms(500);
    std::puts("Engineering Club: Pico 2 W heartbeat");
  }
}
