My motor won't steer in both directinos

When you have a problem like that make a much simpler program without any Serial input that just makes the motor run forward for 5 seconds and then backwards for 5 seconds.

If it does not work post your code and tell us what it actually does. It is much easier to help with a short program.

...R