streaming-kamera/relais.py

22 lines
398 B
Python
Raw Normal View History

2021-03-03 08:25:58 +01:00
import sys, getopt
import RPi.GPIO as GPIO
import time
import threading
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
RELAIS_1_GPIO = 2
GPIO.setup(RELAIS_1_GPIO, GPIO.OUT) # GPIO Modus zuweisen
GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # aus
#time.sleep(3)
#GPIO.output(RELAIS_1_GPIO, GPIO.HIGH) # an
#time.sleep(3)
#fertig
#if __name__ == '__main__':
# while True:
# test = raw_input('Test')