only one dc motor spins

TolpuddleSartre:
Proper and consistent use of agreed labels would help a lot here, like "left" and "right".

Good point and since in the code they are called Motor A and Motor B I suggest those as useful descriptions for now.

So which one always works, Motor A (on pins 5 and 6) or Motor B (on pins 9 and 10)?

Steve