From f3c1c06ddf5e70a83fec6ff3c5b6f24f90587445 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 7 Feb 2024 00:52:03 -0800 Subject: [PATCH] test usb serial --- CMakeLists.txt | 2 ++ bmc.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d22e531..562ed59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,4 +11,6 @@ target_link_libraries(bmc pico_stdlib pico_cyw43_arch_none ) +pico_enable_stdio_usb(bmc 1) +pico_enable_stdio_uart(bmc 0) pico_add_extra_outputs(bmc) \ No newline at end of file diff --git a/bmc.c b/bmc.c index 808fd5b..e0cfdca 100644 --- a/bmc.c +++ b/bmc.c @@ -1,3 +1,4 @@ +#include #include "pico/stdlib.h" #include "pico/cyw43_arch.h" @@ -9,8 +10,10 @@ int main() { } while (true) { cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 1); + printf("LED on"); sleep_ms(1000); cyw43_arch_gpio_put(CYW43_WL_GPIO_LED_PIN, 0); + printf("LED off"); sleep_ms(1000); } } \ No newline at end of file