#script that chnages the LED brightmess over time by increasing/decreasing
#duty cycle.
#frequency must be from 1Hz to 40MHz (1 and 40 000 000)
from machine import Pin,PWM
from time import sleep
frequency=5000
led = PWM(Pin(19),frequency)
while true:
for duty_cycle in range (0,1024,1):
led.duty(duty_cycle)
print(duty_cycle)
sleep(0.005)
for duty_cycle in range (1023,0,-1):
led.duty(duty_cycle)
print(duty_cycle)
sleep(0.005)