initial
This commit is contained in:
23
src/main.c
Normal file
23
src/main.c
Normal file
@@ -0,0 +1,23 @@
|
||||
#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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user