Cant arm my esc with arduino. Please help with code.

Hi there, I cant arm my esc with code. To arm it the manual sais I have to pull the throttle back. All i want to do is control the motor's speed.

Please can someone help

The throttle must be at "off" for several seconds before your ESC will arm. You should get a series of beeps when it is armed. Usually a 1000us pulse for the arming period will allow it to arm. Mine does.

Is this the same query as http://forum.arduino.cc/index.php?topic=428133.msg2951082#msg2951082

Yeh sorry it is. I couldnt get it to work dont know what i am doing wrong. Here is the code

#include <Servo.h>

Servo myservo;

int pos = 0;

void setup()
{
myservo.attach(9,600,2250); // attaches the servo on pin 9 to the servo object
myservo.write(50);
delay(1000);
myservo.write(60);
delay(1000);
myservo.write(70);
delay(1000);
myservo.write(80);
delay(1000);
myservo.write(90);
delay(1000);
myservo.write(100);
delay(1000);
for(pos = 0; pos < 179; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
for(pos = 179; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
delay(10000);
myservo.write(50);
}

void loop()
{
myservo.write(50);
delay(1000);
myservo.write(60);
delay(1000);
myservo.write(70);
delay(1000);
myservo.write(80);
delay(1000);
myservo.write(90);
delay(1000);
myservo.write(100);
delay(1000);
for(pos = 0; pos < 179; pos += 1) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
for(pos = 179; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
delay(10000);
myservo.write(50);
}

void setup()
{
  myservo.attach(9,600,2250);  // attaches the servo on pin 9 to the servo object
  myservo.write(0);
  delay(5000);

Please use code tags. It makes your code more readable.

Insert myServo.write(0); before myServo.attach(); Insert delay(1000); after myServo.attach(); If that doesn't work, increase the delay.

would this work. just dont know how to set the speed to increase and decrease

#include <Servo.h>

Servo motor1;

void arm(){
motor1.write(0);

delay(5000);
}

void setup()
{
motor1.attach(9);

arm();
}

void loop()
{

motor1.write(86);

}