I recently purchased a motor shield from radio shack. The box didn't come with any documentation, but after some googling I determined it was this: Motor Shield V2.0 | Seeed Studio Wiki
On that page it says that it uses pins D8-D13 (Digital I/O pins, I assume) for the motor, so I connected a servo to pin 6. However, if I run the Servo.attach(PIN) method, the motor shield ceases to actually drive the motor. This is the same for every PWM pin, and it doesn't matter if the servo is actually plugged in or not.
To me, it seems pretty clear that the motor shield is doing something funky - but I could definitely be wrong. What do you all think?
Sorry if this is the wrong section; if it is, please point me the right way!
I have the motor shield connected to a battery holder with 4 AAs. If I don't have the servo plugged in, I still get the same results (just assigning the pin for the servo in the code will render the motor shield inoperable)
If I do run the code for the servo and I have it plugged in, the servo itself works fine.
Hi All,
Some time ago I had a similar problem, but then discovered that if you're PWMing the motors, which uses one of the TIMERS, then the servo could be trying to use the same TIMER and if just gets confused and don't work, the TIMER can only do one job at a time, but the good new is the arduino as 3 timers? I think! Check out what pins use which timer??
Try moving the servo to another free pin, change the code to suit and give it a try... Unless well designed some motor shields can be a real pain!! This one looks OK. Especially those who use their own Libraries, for some strange way of coding.
Remember that the L293/L298 will lose about 2v of your 6? in the output transistors, a FET driver is much better, losing almost nothing, Here's a picture of my motor shield, this uses a DVR8833 motor driver module (lower left) and a Buck regulater module to give a constant 5v out even when the batteries get down to 3.5v. I have just started to use 14500/AA Li-ion cells which are 3.7v each so 2 do the job with less weight and bulk.