hello pico

This commit is contained in:
2021-07-26 13:49:58 +09:00
commit 96fb592c03
6 changed files with 153 additions and 0 deletions

26
01_hello_pico/src/hello.c Normal file
View File

@@ -0,0 +1,26 @@
#include <stdio.h>
#include "pico/stdlib.h"
#include "hardware/gpio.h"
#include "pico/binary_info.h"
const uint LED_PIN = 25;
int main()
{
//bi_decl(bi_program_description("This is a test binary."));
//(bi_1pin_with_name(LED_PIN, "On-board LED"));
stdio_init_all();
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true)
{
gpio_put(LED_PIN, 0);
sleep_ms(250);
gpio_put(LED_PIN, 1);
puts("Hello World~~!\n");
sleep_ms(1000);
}
}