Skip to content

Commit dd00d01

Browse files
committed
examples/hwapi/soft_pwm: Use Signal on()/off() methods.
Just one sample is updated with on()/off() for now, there should be remaining sample(s) showing .value() use (but more can be converted later, as long as 1 or so good samples of .value() remains).
1 parent adc80b8 commit dd00d01

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/hwapi/soft_pwm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ def pwm_cycle(led, duty, cycles):
1414
duty_off = 20 - duty
1515
for i in range(cycles):
1616
if duty:
17-
led.value(1)
17+
led.on()
1818
utime.sleep_ms(duty)
1919
if duty_off:
20-
led.value(0)
20+
led.off()
2121
utime.sleep_ms(duty_off)
2222

2323

0 commit comments

Comments
 (0)