help me plzzz

Your first step is to get the motor to do what you want, so create a new sketch for just motor control and work on that. After that you can look at the other parts of the problem.

Mark