Damien George
11 years ago
3 changed files with 21 additions and 1 deletions
@ -0,0 +1,14 @@ |
|||
@micropython.native |
|||
def f(led, n): |
|||
led.off() |
|||
i = 0 |
|||
while i < n: |
|||
led.toggle() |
|||
d = pyb.delay |
|||
d(50) # pyb.delay(50) doesn't work! |
|||
i += 1 |
|||
print(i) |
|||
led.off() |
|||
|
|||
f(pyb.LED(1), 2) |
|||
f(pyb.LED(2), 4) |
@ -0,0 +1,6 @@ |
|||
1 |
|||
2 |
|||
1 |
|||
2 |
|||
3 |
|||
4 |
Loading…
Reference in new issue