from machine import Pin, Timer


# GPIO25, User-controlled blue RGB LED pin

led = Pin(25, Pin.OUT)
Counter = 0
Fun_Num = 0
 
def fun(tim):
    global Counter
    Counter = Counter + 1
    print(Counter)
    led.value(Counter%2)
 
tim = Timer(-1)

# here define the blinking delay
tim.init(period=100, mode=Timer.PERIODIC, callback=fun)