Hello,
I am very new to arduino and am having trouble getting my servo to run. I am using a Traxxas 2075 digital servo (Traxxas 2075 Servo Specifications and Reviews) on the arduino mega 2560. My voltage source is set to 6V and my signal wire is connected to pin 9. Both the arduino and voltage grounds are connected. I looked at this thread http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1217035528 and came up with the code below. Several of the commands were removed because they don't work. The code below worked with a small analog Futaba S3114, but I was unable to get it to work with the digital servo. Am I missing something specific for a digital servo in my code?
#include <Servo.h>
Servo servo1;
void setup()
{
pinMode(9,OUTPUT);
Serial.begin(19200);
servo1.attach(9);
Serial.print("Servo1 Ready\n");
}
void loop()
{
Serial.print("Servo 1 position 70\n");
servo1.write(70);
delay(1500);
Serial.print("Servo 1 position 100\n");
servo1.write(100);
delay(1500);
Serial.print("\n");
delay(3000);
}