Not understanding what is going on here, only using constants...

timberwolf9:
how would you put the board start code into a function. I need those pin name usable throughout the code.

You should go through the beginning examples to see how the code is organized and put into the proper function.