Project 10 - Zoetrope , The motor spin in only one direction

Hi all of you with this problem.

I just copied and pasted your code in my board and everything run perfectly.

It's most probably a wiring problem. Double check all the wires go to the exact pins. Also remember that if you did connect the battery before powering the arduino board you might have burnt the H-bridge or motor controller.