This works but the motor rotates at a constant speed!
To vary the speed, if I write analog values to pin 5 to move it counterclockwise, it is not working (I keep pin 6 LOW throughout)! Same thing is happening with pin 6!
I tried this method using a delay to hold the pin high. The chip runs too fast for the motor, you have to slow it down. And if delay was a variable, you could control the speed. But I burned out my old shield as it did not have any back-emf protection. I have a new shield now but it is not hooked up yet.