2022-04-19T19:58:40

This commit is contained in:
2022-04-19 19:58:41 +09:00
parent 25752057b1
commit f405181219
26 changed files with 632 additions and 7 deletions

View File

@@ -4,7 +4,7 @@
"name": "Linux GCC ARM",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/../../../pico-sdk/src/**"
"${env:PICO_SDK_PATH}/src/**"
],
"defines": [],
"compilerPath": "/usr/bin/gcc",

View File

@@ -1,9 +1,10 @@
#include <stdio.h>
#include <string.h>
#include "pico/stdlib.h"
#include "hardware/gpio.h"
#include "pico/binary_info.h"
const uint LED_PIN = 25;
const uint LED_PIN = PICO_DEFAULT_LED_PIN;
int main()
{
@@ -15,12 +16,14 @@ int main()
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
char *str = "Hello World!";
while (true)
{
gpio_put(LED_PIN, false);
sleep_ms(250);
gpio_put(LED_PIN, true);
puts("Hello World~~!");
puts(str);
sleep_ms(1000);
}
}
}