Uncertain where to post this, is this coding correct?

It's doing what I want now. All I need to do is figure out how to get around using the delay.
Thanks everyone for the help.