Brushless motor not moving... easy fix (i'm sure)

Hello everyone, I am trying to get a brushless motor (ripped off a rc plane with a 18a arrowind esc) to be controlled by my arduino. Only issue is it will not turn! I am trying to run the code below (copied of of the forums here too XD)

I am using an arduino uno, with the ground pin and input (to pin 7) of the esc attached. I am using an external lipo battery.

When I start everything the esc beeps once and then does nothing.

// this uses the Arduino servo library included with version 0012

// caution, this code sweeps the motor up to maximum speed !
// make sure the motor is mounted securily before running.

#include <Servo.h>

Servo myservo;

void arm(){
  // arm the speed controller, modify as necessary for your ESC  
  setSpeed(0);
  delay(1000); //delay 1 second,  some speed controllers may need longer
}

void setSpeed(int speed){
  // speed is from 0 to 100 where 0 is off and 100 is maximum speed
  //the following maps speed values of 0-100 to angles from 0-180,
  // some speed controllers may need different values, see the ESC instructions
  int angle = map(speed, 0, 100, 0, 180);
  myservo.write(angle);    
}

void setup()
{
  myservo.attach(9);
  arm();  
}


void loop()
{
  int speed;

  // sweep up from 0 to to maximum speed in 20 seconds
  for(speed = 0; speed <= 100; speed += 5) {
    setSpeed(speed);
    delay(1000);
  }
  // sweep back down to 0 speed.
  for(speed = 95; speed > 0; speed -= 5) {
    setSpeed(speed);
    delay(1000);
  }
  setSpeed(0);  
  delay(5000); // stop the motor for 5 seconds
}

Thanks for the help!

Do you know for a fact that is the correct arming sequence for that specific ESC? I say that because the one I have you have to initialy move the throttle to 100% pause for a second then move to 0% and a second or so later the ESC sounds off and the motor throttle is then responsive to any command position. It should be armed just like it worked in the plane you took it from, same sequence.

Lefty

Got it working, attached to pin 9 and plugged in esc first, then arduino. Thanks for response!