hausbrand/foo.py
2023-04-09 22:09:35 +02:00

26 lines
736 B
Python

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM) # GPIO Numbers instead of board numbers
RELAIS_1_GPIO = 17
GPIO.setup(RELAIS_1_GPIO, GPIO.OUT) # GPIO Assign mode
#GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # out
GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # on
time.sleep(10)
GPIO.output(RELAIS_1_GPIO, GPIO.HIGH) # on
time.sleep(10)
GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # on
time.sleep(10)
GPIO.output(RELAIS_1_GPIO, GPIO.HIGH) # on
time.sleep(10)
GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # on
time.sleep(10)
GPIO.output(RELAIS_1_GPIO, GPIO.HIGH) # on
time.sleep(10)
GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # on
time.sleep(10)
GPIO.output(RELAIS_1_GPIO, GPIO.HIGH) # on
time.sleep(10)
GPIO.output(RELAIS_1_GPIO, GPIO.LOW) # on
time.sleep(10)