summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holden <steve@holdenweb.com>2024-10-24 01:35:02 +0100
committerDamien George <damien@micropython.org>2024-10-28 11:16:04 +1100
commit4601dcb8a1e88e1cb2d644cc8b0c36378d5966b7 (patch)
tree287024435c8cb39bb2aac8975157523070254cc8
parent44dc6eb30d9a47cc2f7c0c04f012b0dbdae1acae (diff)
rp2/README: Remove redundant `global` statement from example code.
Since `led` is not being rebound inside the `tick` function the standard Python name resolution method will find it. Signed-off-by: Steve Holden <steve@holdenweb.com>
-rw-r--r--ports/rp2/README.md1
1 files changed, 0 insertions, 1 deletions
diff --git a/ports/rp2/README.md b/ports/rp2/README.md
index c2f3771cd..911d797fe 100644
--- a/ports/rp2/README.md
+++ b/ports/rp2/README.md
@@ -69,7 +69,6 @@ from machine import Pin, Timer
led = Pin(25, Pin.OUT)
tim = Timer()
def tick(timer):
- global led
led.toggle()
tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)