# mPy - FKS0001 PWM excercises, high frequency led flashing
# Copyright by Anthony Vogelaar, Perth Scotland
# rev 0.10  2025-12-21  initial release

# GPIO 34 & 35 input only

from 	machine	import	Pin, PWM, freq;		freq(240_000_000)
import	time

# ======================== main =============================

# Frequency range PWM: 1Hz .. 40 MHz 
def main():
    led = PWM(Pin(27), freq=3, duty_u16=655)		# range 0..65539  1%
#    led = PWM(Pin(27), freq=3, duty=1)				# range 0..1024   0.1%
    for i in range(1, 6):
        print(i, end=' ')
        time.sleep(1)
    led.deinit()


main()

# ======================== end =============================
