summaryrefslogtreecommitdiff
path: root/hello_world.c
blob: 53e341c75ee58dd7a1803132480b28f196be5256 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <stdio.h>
#include "pico/stdlib.h"

int main() {
	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);
	}
}