# CircuitPython Blink Example
import pwmio
import board
pins = [board.GP5, board.GP6]
index = 0
pwm = pwmio.PWMOut(pins[index], frequency=1800) # output on LED pin with default of 500Hz
while True:
for cycle in range(0, 65535//2): # Cycles through the full PWM range from 0 to 65535
pwm.duty_cycle = cycle # Cycles the LED pin duty cycle through the range of values
for cycle in range(65534//2, 0, -1): # Cycles through the PWM range backwards from 65534 to 0
pwm.duty_cycle = cycle # Cycles the LED pin duty cycle through the range of values
pwm.deinit()
index += 1
pwm = pwmio.PWMOut(pins[index%2])