Created
March 29, 2021 09:39
-
-
Save elktros/8cc40ece97ad6b26b611e21b27cc8f26 to your computer and use it in GitHub Desktop.
Test C Code for Raspberry Pi Pico New Project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "pico/stdlib.h" | |
#include "hardware/gpio.h" | |
const uint LEDPIN = 25; | |
int main() | |
{ | |
stdio_init_all(); | |
gpio_init(LEDPIN); | |
gpio_set_dir(LEDPIN, GPIO_OUT); | |
while (1) | |
{ | |
gpio_put(LEDPIN, 1); | |
sleep_ms(500); | |
gpio_put(LEDPIN, 0); | |
puts("Hello, World!\n"); | |
sleep_ms(500); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment