parent
82dc633305
commit
43bd91c238
|
@ -1 +1 @@
|
||||||
|
gpiozero==1.6.2
|
||||||
|
|
11
test.py
11
test.py
|
@ -1,15 +1,10 @@
|
||||||
import time
|
import time
|
||||||
import os
|
import os
|
||||||
import RPi.GPIO as GPIO
|
from gpiozero import *
|
||||||
|
|
||||||
|
|
||||||
GPIO.setmode(GPIO.BOARD)
|
|
||||||
GPIO.setwarnings(False)
|
|
||||||
|
|
||||||
pins = [8,10,12,16,18,22,24,26]
|
pins = [8,10,12,16,18,22,24,26]
|
||||||
|
|
||||||
for pin in pins:
|
for pin in pins:
|
||||||
print(pin)
|
print(pin)
|
||||||
GPIO.setup(pin, GPIO.OUT)
|
relay = gpiozero.OutputDevice(pin, active_high=False, initial_value=False)
|
||||||
GPIO.output(pin, GPIO.LOW)
|
relay.on()
|
||||||
GPIO.cleanup()
|
|
Loading…
Reference in New Issue