nrf5/modules: Updating pulse test to set output direction on the LED pin used in the test.
This commit is contained in:
parent
cfbe91a709
commit
02203389c2
|
@ -3,8 +3,8 @@ from machine import PWM, Pin
|
|||
|
||||
def pulse():
|
||||
for i in range(0, 101):
|
||||
p = PWM(0, Pin("A17"), freq=PWM.FREQ_16MHZ, duty=i, period=16000)
|
||||
p = PWM(0, Pin("A17", mode=Pin.OUT), freq=PWM.FREQ_16MHZ, duty=i, period=16000)
|
||||
time.sleep_ms(10)
|
||||
for i in range(0, 101):
|
||||
p = PWM(0, Pin("A17"), freq=PWM.FREQ_16MHZ, duty=100-i, period=16000)
|
||||
p = PWM(0, Pin("A17", mode=Pin.OUT), freq=PWM.FREQ_16MHZ, duty=100-i, period=16000)
|
||||
time.sleep_ms(10)
|
||||
|
|
Loading…
Reference in New Issue