You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
613 B
Python

from machine import Pin, PWM
from time import sleep
print("Clank controller coming online")
# pwm0 = PWM(Pin(0)) # create PWM object from a pin
# pwm0.freq() # get current frequency
# pwm0.freq(1000) # set frequency
# pwm0.duty() # get current duty cycle
# pwm0.duty(200) # set duty cycle
# pwm0.deinit() # turn off PWM on the pin
pwm12 = PWM(Pin(12), freq=1000, duty=0)
pwm13 = PWM(Pin(13), freq=1000, duty=0)
while True:
pwm12.duty(512)
sleep(2)
pwm12.duty(0)
sleep(.3)
pwm13.duty(512)
sleep(2)
pwm13.duty(0)
sleep(.3)