Servo.h library (included with arduino) (SOLVED)

Just to clarify, a servo can only be attached to pins with a timer (A0, A1, A4, A5, A6, A7, D0, and D1), which are the same pins that the 8 PWMs are available on.

Even though D0 actually equates to 0, it’s probably best to code it like myservo.attach(D0); to keep everything super clear, considering the pins are labeled that way. Also makes it easier when you start talking about the analog pins. :wink:

Have fun!

2 Likes