Skip to content

Commit 8a7e057

Browse files
committed
simple while True loop
1 parent 4343fe4 commit 8a7e057

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

00.Basics/RunForever/boot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import pyb
2+
led = pyb.LED(4)

00.Basics/RunForever/main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# simplest way to loop forever:
2+
while True:
3+
led.on()
4+
pyb.delay(10)
5+
led.off()
6+
pyb.delay(10)

0 commit comments

Comments
 (0)