from machine import Pin
from time import sleep

den = Pin(2, Pin.OUT)

for i in range(10):
    den.on()
    sleep(0.5)
    den.off()
    print(i +1)