I am new to Arduino and I was trying to test some code with servos. However, once I place the Servo.attach(myPin) to the code my servo starts moving continuously in steps of around 10º, with a delay of around 0.5 seconds. I tried to eliminate all code but this only line, no Servo.write, no code on void loop() and it still moves the same way. I am sure it is not reading other code, since when I eliminate the attach it stops moving. Thanks in advance.

  • 2
    Please add to your question the cut-down code that still shows the problem. A schematic or a wiring diagram would help, too. Also, the model number of the servo and how it is powered. – JRobert Feb 6 at 13:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.