remove superfluous "global"
Unnecessary, as the variable isn't reassigned.pull/57/head
rodzic
c82971b6e0
commit
386c71a536
|
@ -3,7 +3,6 @@ from machine import Pin, Timer
|
||||||
led = Pin("LED", Pin.OUT)
|
led = Pin("LED", Pin.OUT)
|
||||||
tim = Timer()
|
tim = Timer()
|
||||||
def tick(timer):
|
def tick(timer):
|
||||||
global led
|
|
||||||
led.toggle()
|
led.toggle()
|
||||||
|
|
||||||
tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)
|
tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick)
|
||||||
|
|
Ładowanie…
Reference in New Issue