import time import os import gpiozero pins = [14,15,18,23,24,25,8,7] for pin in pins: print(pin) relay = gpiozero.OutputDevice(pin, active_high=False, initial_value=False) relay.on() time.sleep(10) relay.off()