mirror of
https://github.com/lukstep/raspberry-pi-pico-docker-sdk.git
synced 2025-12-22 18:45:56 +03:00
28 lines
436 B
C
28 lines
436 B
C
#include <stdio.h>
|
|
#include "pico/stdlib.h"
|
|
#include "hardware/gpio.h"
|
|
#include "pico/binary_info.h"
|
|
|
|
const int LED_PIN = 0;
|
|
|
|
int main ()
|
|
{
|
|
int test = 0;
|
|
|
|
stdio_init_all();
|
|
|
|
gpio_init(LED_PIN);
|
|
gpio_set_dir(LED_PIN, GPIO_OUT);
|
|
|
|
while(1)
|
|
{
|
|
gpio_put(LED_PIN, 0);
|
|
sleep_ms(250);
|
|
gpio_put(LED_PIN, 1);
|
|
printf("Hello Word %d\n", test);
|
|
sleep_ms(1000);
|
|
test++;
|
|
}
|
|
}
|
|
|