Hello, welcome to the show,
I think your motors are swapped AND your wires are reversed.
When I find myself in this mess, I try to do a move that _should_ only move one motor. Because of the weird coordinates system, that means moving from a home point to another point, while keeping ONE of the strings the same length.
When the pen moves, it doesn't go to the location that you've asked for.
Step 1: Keep an eye on which motor actually runs the longest. If it is the one you expected, then your motors are OK - they are not swapped.
That is, if you've asked to move it right and down (like in the pic), then you expect:
- Left-hand string should move, get longer.
- Right-hand string should stay still, stay the same length.
If the right-hand string DOES stay roughly the same length, then you have your motors the correct way around. Hurray.
If in fact the LEFT-HAND string stays the same size, and the right-hand string changes size, then you have your motors swapped around.
Step 2
If your motors ARE swapped, AND if the moving string got longer, then your wiring to that motor is reversed.
If your motors are NOT swapped then your moving string got shorter, and that means your wiring to that motor is reversed.
In both these cases, you need to rewire your motor in reverse sequence.
Now try both steps again but moving in the opposite direction, to test the wiring on the opposite motor.
Gosh that seems like hard work!
UNOs are fine, but with the Adafruit Motorshield v2 you are quite limited by memory. I've been given some help from one of the members here that should make it a little more reliable, soon.
Personally I only really use the MEGAs. They are very cheap now if you get a clone, and it's really one less thing to worry about.
good luck!
sn
(see also https://github.com/euphy/polargraph/wiki/It's-going-the-wrong-way!)
|