#define LED_PIN 25 // Define onboard LED pin for Raspberry Pi Pico
void blink_led(int blinks, int duration_ms) {
int interval = duration_ms / (2 * blinks); // Calculate time for each ON/OFF
for (int i = 0; i < blinks; i++) {
digitalWrite(LED_PIN, HIGH); // Turn LED on
delay(interval);
digitalWrite(LED_PIN, LOW); // Turn LED off
delay(interval);
}
}
void setup() {
pinMode(LED_PIN, OUTPUT); // Set LED_PIN as output
}
void loop() {
// Blink 10 times in the first minute
blink_led(10, 60000);
// Blink 20 times in the second minute
blink_led(20, 60000);
// Blink 30 times in the third minute
blink_led(30, 60000);
}