summaryrefslogtreecommitdiff
path: root/hello_world.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-14 10:04:38 -0600
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-09-14 10:04:38 -0600
commitd297d8ec1f5bac1015c53dfe169d2ce1a838b007 (patch)
tree53bea6122b91c7cabc1ee174493c57f860715e92 /hello_world.c
parenta302a66f47f4c7e8cbfe131650d84ca3e6cadea3 (diff)
more
Diffstat (limited to 'hello_world.c')
-rw-r--r--hello_world.c12
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);
+ }
}