2022-04-19T19:58:40
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"name": "Linux GCC ARM",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${workspaceFolder}/../../../pico-sdk/src/**"
|
||||
"${env:PICO_SDK_PATH}/src/**"
|
||||
],
|
||||
"defines": [],
|
||||
"compilerPath": "/usr/bin/gcc",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user