#include "pico/stdlib.h"
void repeat (int pin, int delay);
int main() {
// Specify the PIN number and sleep delay
const uint LED_PIN = 25;
const uint LED_DELAY = 500;
// Setup the LED pin as an output.
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
// Call repeat function to have it blink repeatedly
repeat (LED_PIN, LED_DELAY);
return 0;
}
void repeat (int pin, int delay){
while (true) {
// Toggle the LED on and then sleep for delay period
gpio_put(pin, 1);
sleep_ms(delay);
// Toggle the LED off and then sleep for delay period
gpio_put(pin, 0);
sleep_ms(delay);
}
}