PROGRAMA DEMO import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) import time as tiempo GPIO.setup(8, GPIO.OUT) GPIO.setup(25, GPIO.OUT) GPIO.setup(24, GPIO.OUT) GPIO.setup(23, GPIO.OUT) GPIO.setup(22, GPIO.IN) GPIO.setup(17, GPIO.IN) GPIO.setup(18, GPIO.IN) print ('HOLA ESTE ES MI PROGRAMA') while True: if (GPIO.input(18) == False): print ('SW18 CERRADO') GPIO.output(8, GPIO.HIGH) GPIO.output(25, GPIO.HIGH) GPIO.output(24, GPIO.HIGH) GPIO.output(23, GPIO.HIGH) else: print ('SW18 ABIERTO') GPIO.output(8, GPIO.LOW) GPIO.output(25, GPIO.LOW) GPIO.output(24, GPIO.LOW) GPIO.output(23, GPIO.LOW) GPIO.cleanup