import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) GPIO.setup(18,GPIO.OUT) GPIO.output(18,GPIO.HIGH) # turn on GPIO.output(18,GPIO.LOW) # turn off GPIO.cleanup()