Advertisement
Guest User

Untitled

a guest
Jun 1st, 2022
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include <stdio.h>
  2. #include "pico/stdlib.h"
  3.  
  4. const uint LED_PIN = PICO_DEFAULT_LED_PIN;
  5.  
  6. int main() {
  7.     // Initialize LED pin
  8.     gpio_init(LED_PIN);
  9.     gpio_set_dir(LED_PIN, GPIO_OUT);
  10.     stdio_init_all();
  11.  
  12.     // Loop forever
  13.     while (true) {
  14.         // Blink LED
  15.         printf("Blinking!\r\n");
  16.         gpio_put(LED_PIN, true);
  17.         sleep_ms(1000);
  18.         gpio_put(LED_PIN, false);
  19.         sleep_ms(1000);
  20.     }
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement