parent
ed7126122e
commit
0ee752281a
13
test.py
13
test.py
|
@ -3,12 +3,13 @@ import os
|
|||
import RPi.GPIO as GPIO
|
||||
|
||||
|
||||
GPIO.setmode(GPIO.BOARD)
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
|
||||
GPIO.setup(8, GPIO.OUT)
|
||||
|
||||
GPIO.output(8, GPIO.HIGH)
|
||||
time.sleep(5)
|
||||
GPIO.output(8, GPIO.LOW)
|
||||
pins = [8,10,12,14,18,20,22,24]
|
||||
|
||||
for pin in pins:
|
||||
GPIO.setup(pin, GPIO.OUT)
|
||||
GPIO.output(pin, GPIO.LOW)
|
||||
time.sleep(1)
|
||||
GPIO.output(pin, GPIO.HIGH)
|
||||
GPIO.cleanup
|
Loading…
Reference in New Issue