Trying do drive a stepper motor

AWOL:

 if(x = 1)

Oops

Try:

if(x == 1)