#!/usr/bin/env python3
import RPi.GPIO as GPIO
import time

try:
    GPIO.setmode(GPIO.BCM)
    GPIO.setwarnings(False)
    GPIO.setup(24,GPIO.OUT)
    print("LED on")
    GPIO.output(24,GPIO.HIGH)
    time.sleep(1)
    print("LED off")
    GPIO.output(24,GPIO.LOW)

    GPIO.setmode(GPIO.BCM)
    GPIO.setwarnings(False)
    GPIO.setup(17,GPIO.OUT)
    print("LED on")
    GPIO.output(17,GPIO.HIGH)
    time.sleep(1)
    print("LED off")
    GPIO.output(17,GPIO.LOW)

    GPIO.setmode(GPIO.BCM)
    GPIO.setwarnings(False)
    GPIO.setup(27,GPIO.OUT)
    print("LED on")
    GPIO.output(27,GPIO.HIGH)
    time.sleep(1)
    print("LED off")
    GPIO.output(27,GPIO.LOW)



except KeyboardInterrupt:
    # here you put any code you want to run before the program
    # exits when you press CTRL+C
    print("Exiting") # print value of counter

except:
    # this catches ALL other exceptions including errors.
    # You won't get any error messages for debugging
    # so only use it once your code is working
    print("Exiting") # print value of counter

finally:
    GPIO.cleanup() # this ensures a clean exit

