import board
import time
import pwmio

# Create a PWMOut object on an LED pin
led = pwmio.PWMOut(board.GP1, duty_cycle=0, frequency=5000)

# Change Duty Cycle Value to max 16 bit
led.duty_cycle = 65535

while True: # Loop for the board to execute the function and 
continue to do 
    led.duty_cycle = 500  # Determine the intensity of light
    time.sleep(1)
    led.duty_cycle = 1000
    time.sleep(1)
    led.duty_cycle = 2000
    time.sleep(1)
    led.duty_cycle = 3000
    time.sleep(1)
    led.duty_cycle = 4000
    time.sleep(1)

C I R C U I T P Y T H O N