import time
import RPi.GPIO as GPIO

#GPIO setup
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(29, GPIO.OUT)
GPIO.setup(31, GPIO.OUT)
GPIO.setup(33, GPIO.OUT)
GPIO.setup(35, GPIO.OUT)
GPIO.setup(37, GPIO.OUT)
GPIO.setup(32, GPIO.OUT)
GPIO.setup(36, GPIO.OUT)
GPIO.setup(38, GPIO.OUT)

def ZERO():
	GPIO.output(29, False)
	GPIO.output(31, True)
	GPIO.output(33, True)
	GPIO.output(35, True)
	GPIO.output(37, True)
	GPIO.output(32, True)
	GPIO.output(36, True)
	GPIO.output(38, True)
def ONE():
	GPIO.output(29, False)
	GPIO.output(31, False)
	GPIO.output(33, False)
	GPIO.output(35, True)
	GPIO.output(37, False)
	GPIO.output(32, False)
	GPIO.output(36, True)
	GPIO.output(38, True)
def TWO():
	GPIO.output(29, True)
	GPIO.output(31, False)
	GPIO.output(33, True)
	GPIO.output(35, True)
	GPIO.output(37, True)
	GPIO.output(32, True)
	GPIO.output(36, False)
	GPIO.output(38, True)
def THREE():
	GPIO.output(29, True)
	GPIO.output(31, False)
	GPIO.output(33, True)
	GPIO.output(35, True)
	GPIO.output(37, False)
	GPIO.output(32, True)
	GPIO.output(36, True)
	GPIO.output(38, True)
def FOUR():
	GPIO.output(29, True)
	GPIO.output(31, True)
	GPIO.output(33, False)
	GPIO.output(35, True)
	GPIO.output(37, False)
	GPIO.output(32, False)
	GPIO.output(36, True)
	GPIO.output(38, False)
def FIVE():
	GPIO.output(29, True)
	GPIO.output(31, True)
	GPIO.output(33, True)
	GPIO.output(35, False)
	GPIO.output(37, False)
	GPIO.output(32, True)
	GPIO.output(36, True)
	GPIO.output(38, False)
def SIX():
	GPIO.output(29, True)
	GPIO.output(31, True)
	GPIO.output(33, True)
	GPIO.output(35, False)
	GPIO.output(37, True)
	GPIO.output(32, True)
	GPIO.output(36, True)
	GPIO.output(38, True)
def SEVEN():
	GPIO.output(29, False)
	GPIO.output(31, False)
	GPIO.output(33, True)
	GPIO.output(35, True)
	GPIO.output(37, False)
	GPIO.output(32, False)
	GPIO.output(36, True)
	GPIO.output(38, False)
def EIGHT():
	GPIO.output(29, True)
	GPIO.output(31, True)
	GPIO.output(33, True)
	GPIO.output(35, True)
	GPIO.output(37, True)
	GPIO.output(32, True)
	GPIO.output(36, True)
	GPIO.output(38, True)
def NINE():
	GPIO.output(29, True)
	GPIO.output(31, True)
	GPIO.output(33, True)
	GPIO.output(35, True)
	GPIO.output(37, False)
	GPIO.output(32, True)
	GPIO.output(36, True)
	GPIO.output(38, True)
def STOP():
	GPIO.output(29, False)
	GPIO.output(31, False)
	GPIO.output(33, False)
	GPIO.output(35, False)
	GPIO.output(37, False)
	GPIO.output(32, False)
	GPIO.output(36, False)
	GPIO.output(38, False)

print ("Showing Zero")
time.sleep(0.65)
ZERO()
time.sleep(0.65)
print ("Showing One")
time.sleep(0.65)
ONE()
time.sleep(0.65)
print ("Showing Two")
time.sleep(0.65)
TWO()
time.sleep(0.65)
print ("Showing Three")
time.sleep(0.65)
THREE()
time.sleep(0.65)
print ("Showing Four")
time.sleep(0.65)
FOUR()
time.sleep(0.65)
print ("Showing Five")
time.sleep(0.65)
FIVE()
time.sleep(0.65)
print ("Showing Six")
time.sleep(0.65)
SIX()
time.sleep(0.65)
print ("Showing Seven")
time.sleep(0.65)
SEVEN()
time.sleep(0.65)
print ("Showing Eight")
time.sleep(0.65)
EIGHT()
time.sleep(0.65)
print ("Showing Nine")
time.sleep(0.65)
NINE()
time.sleep(0.65)
print ("Stop now")
time.sleep(0.65)
STOP()
time.sleep(0.65)

GPIO.cleanup()


