changed gpio to board

Signed-off-by: Ebbe Baß <ebbe@ping-mee.de>
master
Ebbe Baß 2022-07-17 16:44:49 +02:00
parent ebf6d095ef
commit 6ba3dcd48a
1 changed files with 6 additions and 6 deletions

12
test.py
View File

@ -4,12 +4,12 @@ from datetime import datetime
import RPi.GPIO as GPIO import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM) GPIO.setmode(GPIO.BOARD)
GPIO.setup(4, GPIO.OUT) GPIO.setup(7, GPIO.OUT)
GPIO.output(4, GPIO.HIGH) GPIO.output(7, GPIO.HIGH)
time.sleep(1) time.sleep(1)
GPIO.output(4, GPIO.LOW) GPIO.output(7, GPIO.LOW)
time.sleep(1) time.sleep(1)
GPIO.cleanup() GPIO.cleanup()
@ -36,7 +36,7 @@ GPIO.cleanup()
# error_print("Unknown state for relay ("+state+")") # error_print("Unknown state for relay ("+state+")")
# while True: # while True:
# relay_controller(4, "True") # relay_controller(7, "True")
# time.sleep(2) # time.sleep(2)
# relay_controller(4, "False") # relay_controller(7, "False")
# time.sleep(2) # time.sleep(2)