2022-07-06 16:34:46 +00:00
|
|
|
import time
|
|
|
|
import os
|
2022-07-06 17:19:58 +00:00
|
|
|
import gpiozero
|
2022-07-06 16:34:46 +00:00
|
|
|
|
2022-07-07 05:16:58 +00:00
|
|
|
pins = [14,15]
|
2022-07-06 16:41:32 +00:00
|
|
|
|
2022-07-06 17:44:02 +00:00
|
|
|
# for pin in pins:
|
|
|
|
# print(pin)
|
|
|
|
# relay = gpiozero.OutputDevice(pin, active_high=False, initial_value=False)
|
|
|
|
# relay.on()
|
|
|
|
# time.sleep(1)
|
|
|
|
# relay.off()
|
|
|
|
|
2022-07-06 17:44:17 +00:00
|
|
|
relay = gpiozero.OutputDevice(14, active_high=False, initial_value=False)
|
2022-07-06 17:44:02 +00:00
|
|
|
relay.on()
|
|
|
|
time.sleep(30)
|
|
|
|
relay.off()
|