From 4601dcb8a1e88e1cb2d644cc8b0c36378d5966b7 Mon Sep 17 00:00:00 2001 From: Steve Holden Date: Thu, 24 Oct 2024 01:35:02 +0100 Subject: [PATCH] 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 --- ports/rp2/README.md | 1 - 1 file changed, 1 deletion(-) 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)