Initial Release
This commit is contained in:
12
blink/CMakeLists.txt
Normal file
12
blink/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
add_executable(blink
|
||||
blink.c
|
||||
)
|
||||
|
||||
# Pull in our pico_stdlib which pulls in commonly used features
|
||||
target_link_libraries(blink pico_stdlib)
|
||||
|
||||
# create map/bin/hex file etc.
|
||||
pico_add_extra_outputs(blink)
|
||||
|
||||
# add url via pico_set_program_url
|
||||
example_auto_set_url(blink)
|
||||
19
blink/blink.c
Normal file
19
blink/blink.c
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include "pico/stdlib.h"
|
||||
|
||||
int main() {
|
||||
const uint LED_PIN = 25;
|
||||
gpio_init(LED_PIN);
|
||||
gpio_set_dir(LED_PIN, GPIO_OUT);
|
||||
while (true) {
|
||||
gpio_put(LED_PIN, 1);
|
||||
sleep_ms(250);
|
||||
gpio_put(LED_PIN, 0);
|
||||
sleep_ms(250);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user