From dd00d0134bf4a15fe4f72dc8a157587052717c59 Mon Sep 17 00:00:00 2001
From: Paul Sokolovsky <pfalcon@users.sourceforge.net>
Date: Tue, 14 Feb 2017 13:11:49 +0300
Subject: [PATCH] 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).
---
 examples/hwapi/soft_pwm.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/hwapi/soft_pwm.py b/examples/hwapi/soft_pwm.py
index a9a556171..72291b0ec 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)
 
 
-- 
GitLab