def init_relay(): # switch to BCM GPIO.setmode(GPIO.BCM) # disable warning of used ports GPIO.setwarnings(False) # set the port as output port GPIO.setup(CTL_OUT, GPIO.OUT)