user7790: I am trying to build a quadcopter using an arduino. I Bought 4 30A ESC's from Ebay the link is http://www.ebay.co.uk/itm/4pcs-Brushless-speed-controller-ESC-MultiCopter-KK-Quad-rotor-X-copter-30A-S-/310950293677?pt=LH_DefaultDomain_3&hash=item486614f0ad and a A2212 2200KV motor, im also using a sparkfun arduino uno. I have connected the white (data) servo wire of the ESC to pin 9 of my arduino and the black (ground) servo wire of the ESC to gnd of the arduino. When i connect the battery to the esc i get the 3 beeps because of my 3 cell battery regardless of what code is on the arduino even if the arduino is not present. the code that is on the arduino is. 
#include <Servo.h>

Servo motor;

void setup()
{
  Serial.begin(9600);
  motor.attach(0);
}
void loop()
{
  motor.write(100);
}

I'm not sure what is wrong. Can someone please help me.

user16158: I had a similar problem. I solved it by using an oscilloscope to measure the arming sequence of an out-of-the-box RC remote controller and receiver.
The arming sequence through the controller-receiver was like this:

Connect ESC to battery (arduino is connected to signal and ground prior to this)
Wait for 3 beeps
Set the throttle to the lowest possible
Wait for another beep

I then adjusted my arduino code to output the same(similar) sequence.
Here is the code:
#include <Servo.h>
#define POT A0

Servo m1;

void setup() {
  m1.attach(6);
  Serial.begin(9600);
  delay(50);
  Serial.println("Serial ready:");
  arm(m1);
}

void loop() {
  int potValue = analogRead(POT);
  int s = map(potValue,60,930,1200,1700); //Map the pot values to motor values

  m1.write(s);
  Serial.println(s);
}

void arm(Servo m){
  Serial.print("Arming.");
  m.write(0);
  delay(100);
  m.write(1224); //A value at which the motor starts turning
  delay(2000);
  m.write(1024); //A value at which the motor stands still
  delay(3000);
  Serial.println(" Armed!");
}

You can also see a video of the whole thing in action here: A2212/13T brushless motor on a pivoting arm
EDIT: Further testing shows, that it suffices to output a low non zero value to arm this ESC. Simply doing Servo.write(1024); until you hear the confirmation beep seems to work.

7790: <p>I am trying to build a quadcopter using an arduino. I Bought 4 30A ESC's from Ebay the link is <a href="http://www.ebay.co.uk/itm/4pcs-Brushless-speed-controller-ESC-MultiCopter-KK-Quad-rotor-X-copter-30A-S-/310950293677?pt=LH_DefaultDomain_3&amp;hash=item486614f0ad" rel="nofollow">http://www.ebay.co.uk/itm/4pcs-Brushless-speed-controller-ESC-MultiCopter-KK-Quad-rotor-X-copter-30A-S-/310950293677?pt=LH_DefaultDomain_3&amp;hash=item486614f0ad</a> and a A2212 2200KV motor, im also using a sparkfun arduino uno. I have connected the white (data) servo wire of the ESC to pin 9 of my arduino and the black (ground) servo wire of the ESC to gnd of the arduino. When i connect the battery to the esc i get the 3 beeps because of my 3 cell battery regardless of what code is on the arduino even if the arduino is not present. the code that is on the arduino is. </p>

<pre><code>#include &lt;Servo.h&gt;

Servo motor;

void setup()
{
  Serial.begin(9600);
  motor.attach(0);
}
void loop()
{
  motor.write(100);
}
</code></pre>

<p>I'm not sure what is wrong. Can someone please help me.</p>
 16158: <p>I had a similar problem. I solved it by using an oscilloscope to measure the arming sequence of an out-of-the-box RC remote controller and receiver.</p>

<p>The arming sequence through the controller-receiver was like this:</p>

<ol>
<li>Connect ESC to battery (arduino is connected to signal and ground prior to this)</li>
<li>Wait for 3 beeps</li>
<li>Set the throttle to the lowest possible</li>
<li>Wait for another beep</li>
</ol>

<p>I then adjusted my arduino code to output the same(similar) sequence.</p>

<p>Here is the code:</p>

<pre><code>#include &lt;Servo.h&gt;
#define POT A0

Servo m1;

void setup() {
  m1.attach(6);
  Serial.begin(9600);
  delay(50);
  Serial.println("Serial ready:");
  arm(m1);
}

void loop() {
  int potValue = analogRead(POT);
  int s = map(potValue,60,930,1200,1700); //Map the pot values to motor values

  m1.write(s);
  Serial.println(s);
}

void arm(Servo m){
  Serial.print("Arming.");
  m.write(0);
  delay(100);
  m.write(1224); //A value at which the motor starts turning
  delay(2000);
  m.write(1024); //A value at which the motor stands still
  delay(3000);
  Serial.println(" Armed!");
}
</code></pre>

<p>You can also see a video of the whole thing in action here: <a href="https://www.youtube.com/watch?v=jJPW61Joacw" rel="nofollow">A2212/13T brushless motor on a pivoting arm</a></p>

<p><strong>EDIT:</strong> Further testing shows, that it suffices to output a low non zero value to arm this ESC. Simply doing Servo.write(1024); until you hear the confirmation beep seems to work.</p>
