Fix some syntax errors

This commit is contained in:
Lynn Ochs 2019-11-25 23:56:22 +01:00
parent 031759ff7c
commit 010215055c

View File

@ -164,9 +164,9 @@ led = Pin(5, Pin.OUT)
def callback(timer): def callback(timer):
global data, index global data, index
data[index] = utime.ticks_ms data[index] = utime.ticks_ms()
index = (index + 1) % 32 index = (index + 1) % 32
led(!led()) led(not led())
# Run the callback once, after 100 ms # Run the callback once, after 100 ms
timer.init(mode = Timer.ONE_SHOT, period = 100, callback = callback) timer.init(mode = Timer.ONE_SHOT, period = 100, callback = callback)