#include "pico/stdlib.h"
/**
* @brief Toggles an LED and waits for a specified delay
*
* @param led_pin GPIO pin connected to the LED
* @param delay_ms Delay in milliseconds
*/
void blinkLED(uint led_pin, uint delay_ms) {
static bool state = false;
state = !state;
gpio_put(led_pin, state);
sleep_ms(delay_ms);
}
int main() {
const uint LED_PIN = 25;
const uint LED_DELAY = 500;
gpio_init(LED_PIN);
gpio_set_dir(LED_PIN, GPIO_OUT);
while (true) {
blinkLED(LED_PIN, LED_DELAY);
}
return 0;
}