summaryrefslogtreecommitdiff
path: root/hello_world.c
diff options
context:
space:
mode:
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);
+ }
}