You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
223 B
16 lines
223 B
4 years ago
|
import pyb
|
||
|
|
||
|
@micropython.native
|
||
|
def f(led, n, d):
|
||
|
led.off()
|
||
|
i = 0
|
||
|
while i < n:
|
||
|
print(i)
|
||
|
led.toggle()
|
||
|
pyb.delay(d)
|
||
|
i += 1
|
||
|
led.off()
|
||
|
|
||
|
f(pyb.LED(1), 2, 150)
|
||
|
f(pyb.LED(2), 4, 50)
|