Hi everyone recently got adafruit motor shield v1.0 and was wondering how i go about connecting the servo as nothing seems to be wroking? I also want to connect 2 dc motors as well as the servo simultaneously. I have already tested the motors with this shield and everything works fine its just the servo, could be my code I'm not sure and cant find anything of much use on the internet. I have attached my code and an image of the board and servo.
Thanks for the whole sketch and the photo.
Everything seems fine. But I think that pin 9 uses the lower servo pins and you have the servo connector in the upper servo pins.
Hacker594:
Hi everyone recently got adafruit motor shield v1.0 and was wondering how i go about connecting the servo as nothing seems to be wroking?
You appear to be trying to run your servo from the Arduino power supply. You haven't stated what type of servo you're using, but usually a servo requires more current than the Arduino can supply. I suggest you use an external supply for both your motors and the servo.
N.B. The Adafruit motor shield V1 has the servo numbers reversed on the silkscreen.
Both wrong this is just the standard problem with motor shields and servo. the PWM for the speed control on the motor uses the same timer as servo.h uses to control the servo and this screws things up. Rule of thumb - you can not use servo with a motor shield. Try newservo - look in the playground.
holmes4:
Both wrong this is just the standard problem with motor shields and servo. the PWM for the speed control on the motor uses the same timer as servo.h uses to control the servo and this screws things up. Rule of thumb - you can not use servo with a motor shield. Try newservo - look in the playground.
Mark.
Check the Adafruit website. They claim their motor shield works with both at the same time.