parent
ebf6d095ef
commit
6ba3dcd48a
12
test.py
12
test.py
|
@ -4,12 +4,12 @@ from datetime import datetime
|
|||
import RPi.GPIO as GPIO
|
||||
|
||||
|
||||
GPIO.setmode(GPIO.BCM)
|
||||
GPIO.setmode(GPIO.BOARD)
|
||||
|
||||
GPIO.setup(4, GPIO.OUT)
|
||||
GPIO.output(4, GPIO.HIGH)
|
||||
GPIO.setup(7, GPIO.OUT)
|
||||
GPIO.output(7, GPIO.HIGH)
|
||||
time.sleep(1)
|
||||
GPIO.output(4, GPIO.LOW)
|
||||
GPIO.output(7, GPIO.LOW)
|
||||
time.sleep(1)
|
||||
GPIO.cleanup()
|
||||
|
||||
|
@ -36,7 +36,7 @@ GPIO.cleanup()
|
|||
# error_print("Unknown state for relay ("+state+")")
|
||||
|
||||
# while True:
|
||||
# relay_controller(4, "True")
|
||||
# relay_controller(7, "True")
|
||||
# time.sleep(2)
|
||||
# relay_controller(4, "False")
|
||||
# relay_controller(7, "False")
|
||||
# time.sleep(2)
|
Loading…
Reference in New Issue