Created
August 21, 2021 11:30
-
-
Save tm-sanjay/49a4677b15c97c34e16ba739162bf915 to your computer and use it in GitHub Desktop.
pi pico Blink led (c/c++)
This file contains hidden or 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 "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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment