Using the Servo Library

The Servo library supports up to 12 motors on most Arduino boards and 48 on the Arduino Mega. On boards other than the Mega, use of the library disables analogWrite() (PWM) functionality on pins 9 and 10, whether or not there is a Servo on those pins. On the Mega, up to 12 servos can be used without interfering with PWM functionality; use of 12 to 23 motors will disable PWM on pins 11 and 12.
servo_bb

Wiring

To wire your Servo to your Arduino, connect the following pins:

  • Servo +5V –> Arduino +5V
  • Servo Ground –> Arduino Ground
  • Servo Signal –> Arduino Pin 9
  • Potentiometer Middle Pin –> Arduino Pin A0
  • Don’t forget to connect and the other 2 pins of potentiometer to Ground and +5V.

 

Recommended Software

  • none

Instructions and Code

Posted in Arduino Tutorials Tagged with: , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*