Skip to content

Commit 4601dcb

Browse files
holdenwebdpgeorge
authored andcommitted
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 <[email protected]>
1 parent 44dc6eb commit 4601dcb

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

ports/rp2/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ from machine import Pin, Timer
6969
led = Pin(25, Pin.OUT)
7070
tim = Timer()
7171
def tick(timer):
72-
global led
7372
led.toggle()
7473

7574
tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)

0 commit comments

Comments
 (0)