Lab 11 Servo Code
This commit is contained in:
parent
a37409e5e7
commit
0295841fa7
20 changed files with 8354 additions and 0 deletions
21
Lab11/CircuitPython/Code/blink_internal.py
Normal file
21
Lab11/CircuitPython/Code/blink_internal.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Program for CircuitPython on a Pico W
|
||||
|
||||
import board
|
||||
import digitalio
|
||||
import time
|
||||
|
||||
led = digitalio.DigitalInOut(board.LED)
|
||||
led.direction = digitalio.Direction.OUTPUT
|
||||
|
||||
print("Hello, CircuitPython!")
|
||||
|
||||
while True:
|
||||
|
||||
print("On!")
|
||||
led.value = True
|
||||
time.sleep(1)
|
||||
|
||||
print("Off!")
|
||||
led.value = False
|
||||
time.sleep(1)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue