Chapter 2
This commit is contained in:
parent
d5acb424e1
commit
375df187cb
12
ch-2/blink.py
Normal file
12
ch-2/blink.py
Normal file
@ -0,0 +1,12 @@
|
||||
import time
|
||||
import board
|
||||
import digitalio
|
||||
|
||||
led = digitalio.DigitalInOut(board.LED)
|
||||
led.direction = digitalio.Direction.OUTPUT
|
||||
|
||||
while True:
|
||||
led.value = True
|
||||
time.sleep(0.5)
|
||||
led.value = False
|
||||
time.sleep(0.5)
|
||||
1
ch-2/helloworld.py
Normal file
1
ch-2/helloworld.py
Normal file
@ -0,0 +1 @@
|
||||
print("Hello, world!")
|
||||
5
ch-2/light_led.py
Normal file
5
ch-2/light_led.py
Normal file
@ -0,0 +1,5 @@
|
||||
import board
|
||||
import digitalio
|
||||
led = digitalio.DigitalInOut(board.LED)
|
||||
led.direction = digitalio.Direction.OUTPUT
|
||||
led.value = True
|
||||
Loading…
x
Reference in New Issue
Block a user