24 lines
490 B
C
24 lines
490 B
C
#include <stdio.h>
|
|
#include "pico/stdlib.h"
|
|
#include "pico/cyw43_arch.h"
|
|
#include <stdbool.h>
|
|
|
|
int main(void) {
|
|
stdio_init_all();
|
|
|
|
// Initialise the Wi-Fi chip
|
|
if (cyw43_arch_init()) {
|
|
printf("Wi-Fi init failed\n");
|
|
return -1;
|
|
}
|
|
|
|
// Example to turn on the Pico W LED
|
|
bool led_on = true;
|
|
|
|
while (true) {
|
|
cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, led_on);
|
|
led_on = !led_on; // Toggle LED state
|
|
sleep_ms(1000);
|
|
}
|
|
}
|