diff options
author | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-14 10:04:38 -0600 |
---|---|---|
committer | Luke T. Shumaker <lukeshu@lukeshu.com> | 2024-09-14 10:04:38 -0600 |
commit | d297d8ec1f5bac1015c53dfe169d2ce1a838b007 (patch) | |
tree | 53bea6122b91c7cabc1ee174493c57f860715e92 /hello_world.c | |
parent | a302a66f47f4c7e8cbfe131650d84ca3e6cadea3 (diff) |
more
Diffstat (limited to 'hello_world.c')
-rw-r--r-- | hello_world.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/hello_world.c b/hello_world.c index 49008a6..53e341c 100644 --- a/hello_world.c +++ b/hello_world.c @@ -2,7 +2,13 @@ #include "pico/stdlib.h" int main() { - setup_default_uart(); - printf("Hello, world!\n"); - return 0; + stdio_init_all(); + gpio_init(PICO_DEFAULT_LED_PIN); + gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT); + + for (bool st = true; true; st = !st) { + gpio_put(PICO_DEFAULT_LED_PIN, st); + printf("Hello, world!\n"); + sleep_ms(1000); + } } |