diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-02-14 13:11:49 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-02-14 13:13:41 +0300 |
commit | dd00d0134bf4a15fe4f72dc8a157587052717c59 (patch) | |
tree | 71ef16725b298188c2fe8585fadb5da52c25a29b | |
parent | adc80b8f8469874624a200acaddbed901bdd34ee (diff) | |
download | micropython-dd00d0134bf4a15fe4f72dc8a157587052717c59.tar.gz micropython-dd00d0134bf4a15fe4f72dc8a157587052717c59.zip |
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).
-rw-r--r-- | examples/hwapi/soft_pwm.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/hwapi/soft_pwm.py b/examples/hwapi/soft_pwm.py index a9a5561717..72291b0ecd 100644 --- a/examples/hwapi/soft_pwm.py +++ b/examples/hwapi/soft_pwm.py @@ -14,10 +14,10 @@ def pwm_cycle(led, duty, cycles): duty_off = 20 - duty for i in range(cycles): if duty: - led.value(1) + led.on() utime.sleep_ms(duty) if duty_off: - led.value(0) + led.off() utime.sleep_ms(duty_off) |