from machine import Pin
import time
# Set up the onboard LED (GPIO 25 on Raspberry Pi Pico)
led = Pin(0, Pin.OUT)
# Counter for cycles
cycle_count = 0
blink_duration = 1 # Initial blink duration (1 second ON/OFF)
# Main loop
while True:
# Turn LED ON
led.value(1) # LED ON
time.sleep(blink_duration) # Wait for the current blink duration
# Turn LED OFF
led.value(0) # LED OFF
time.sleep(blink_duration) # Wait for the current blink duration
# Increment the cycle count
cycle_count += 1
# Every 5 cycles, increase the blink duration by 1 second
if cycle_count % 5 == 0:
blink_duration += 1 # Increase the blink duration after every 5 cycles