user30494: Sorry in advance as I'm still a rookie with Arduino projects. My goal is to use an Arduino Uno 3 to create an inexpensive drone/plane project.
Here are my materials and my set up:

A2212 1000kv Brushless Motor
HW30A Brushless Motor Speed Controller (ESC)
Arduino Uno R3
bunch of cables
9 V battery

Upon compiling the code I found here and connecting the 9 V battery to the ESC, all I hear is constant beep sounds from the motor (about once every 1.5 seconds). Can anyone help me figure out what's going on? Is it the 9 V battery that's not giving the motor enough juice? Or am I just too silly hoping to create something that works under $10?
#include <Servo.h>
Servo ESC1;

int pos = 0; //Sets position variable

void arm() {
  setSpeed(0); //Sets speed variable delay(1000);
}

void setSpeed(int speed){
  int angle = map(speed, 0, 100, 0, 180);
  //Sets servo positions to different speeds ESC1.write(angle);
}

void setup() {
  ESC1.attach(9); //Adds ESC to certain pin. arm();
}

void loop() {
  int speed; //Implements speed variable
  for(speed = 0; speed <= 70; speed += 5) {
    //Cycles speed up to 70% power for 1 second
    setSpeed(speed);
    //Creates variable for speed to be used in in for loop
    delay(1000);
  }
  delay(4000); //Stays on for 4 seconds
  for(speed = 70; speed > 0; speed -= 5) {
    // Cycles speed down to 0% power for 1 second
    setSpeed(speed); delay(1000);
  }
  setSpeed(0);
  //Sets speed variable to zero no matter what
  delay(1000);
  //Turns off for 1 second
}





user30488: The beeping is actually from the ESC. I believe that this model needs to be properly configured (which you can do using the Arduino - refer to the user manual or here) before it can be used. Some kits come with it preconfigured but since you seem to have possibly purchased it individually you need to configure it yourself. Also it doesn't appear to be that your code wouldn't actually send any PWM signals to the ESC. I've only ever used Servo.write() functions in my quads, so I can't be 100% sure on that.

user30319: Like the previous answer stated, you should be using a 20-25c battery (can discharge up to 25A). I don't know exactly how much a 9V draws, but it definitely can't supply more than an AMP. Your motor pulls much more than 1 amp. Get yourself a nice LiPo from hobbyking.com, maybe an 8.4v or 11.1v
The ESC beeping could be telling you it can't draw enough Amps from the battery?

user49880: Probably a bit late but your code has some important parts commented out such as (in order):

delay(1000);
ESC1.write(angle);
arm();

Once you add those to the next lines the program should work and the esc shouldn't just beep and actually get the motor to spin

30494: <p>Sorry in advance as I'm still a rookie with Arduino projects. My goal is to use an Arduino Uno 3 to create an inexpensive drone/plane project.</p>

<p>Here are my materials and my set up:</p>

<ul>
<li><a href="http://www.ebay.com/itm/371792238120?_trksid=p2060353.m2749.l2649&amp;ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow noreferrer">A2212 1000kv Brushless Motor</a></li>
<li><a href="http://www.ebay.com/itm/131988260966?_trksid=p2060353.m2749.l2649&amp;ssPageName=STRK%3AMEBIDX%3AIT" rel="nofollow noreferrer">HW30A Brushless Motor Speed Controller (ESC)</a></li>
<li>Arduino Uno R3</li>
<li>bunch of cables</li>
<li>9 V battery</li>
</ul>

<p>Upon compiling the code I found <a href="http://www.instructables.com/id/How-to-run-an-ESC-with-Arduino/" rel="nofollow noreferrer">here</a> and connecting the 9 V battery to the ESC, all I hear is constant beep sounds from the motor (about once every 1.5 seconds). Can anyone help me figure out what's going on? Is it the 9 V battery that's not giving the motor enough juice? Or am I just too silly hoping to create something that works under $10?</p>

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

int pos = 0; //Sets position variable

void arm() {
  setSpeed(0); //Sets speed variable delay(1000);
}

void setSpeed(int speed){
  int angle = map(speed, 0, 100, 0, 180);
  //Sets servo positions to different speeds ESC1.write(angle);
}

void setup() {
  ESC1.attach(9); //Adds ESC to certain pin. arm();
}

void loop() {
  int speed; //Implements speed variable
  for(speed = 0; speed &lt;= 70; speed += 5) {
    //Cycles speed up to 70% power for 1 second
    setSpeed(speed);
    //Creates variable for speed to be used in in for loop
    delay(1000);
  }
  delay(4000); //Stays on for 4 seconds
  for(speed = 70; speed &gt; 0; speed -= 5) {
    // Cycles speed down to 0% power for 1 second
    setSpeed(speed); delay(1000);
  }
  setSpeed(0);
  //Sets speed variable to zero no matter what
  delay(1000);
  //Turns off for 1 second
}
</code></pre>

<p><a href="https://i.stack.imgur.com/eDCaN.jpg" rel="nofollow noreferrer" title="Full build"><img src="https://i.stack.imgur.com/eDCaN.jpg" alt="Full build" title="Full build"></a>
<a href="https://i.stack.imgur.com/WYvCh.jpg" rel="nofollow noreferrer" title="Battery"><img src="https://i.stack.imgur.com/WYvCh.jpg" alt="Battery" title="Battery"></a>
<a href="https://i.stack.imgur.com/i3Wm0.jpg" rel="nofollow noreferrer" title="Arduino"><img src="https://i.stack.imgur.com/i3Wm0.jpg" alt="Arduino" title="Arduino"></a></p>
 30488: <p>The beeping is actually from the ESC. I believe that this model needs to be properly configured (which you can do using the Arduino - refer to the user manual or <a href="http://www.instructables.com/id/ESC-Programming-on-Arduino-Hobbyking-ESC/" rel="nofollow noreferrer">here</a>) before it can be used. Some kits come with it preconfigured but since you seem to have possibly purchased it individually you need to configure it yourself. Also it doesn't appear to be that your code wouldn't actually send any PWM signals to the ESC. I've only ever used Servo.write() functions in my quads, so I can't be 100% sure on that.</p>
 30319: <p>Like the previous answer stated, you should be using a 20-25c battery (can discharge up to 25A). I don't know exactly how much a 9V draws, but it definitely can't supply more than an AMP. Your motor pulls much more than 1 amp. Get yourself a nice LiPo from hobbyking.com, maybe an 8.4v or 11.1v</p>

<p>The ESC beeping could be telling you it can't draw enough Amps from the battery?</p>
 49880: <p>Probably a bit late but your code has some important parts commented out such as (in order):</p>

<ul>
<li>delay(1000);</li>
<li>ESC1.write(angle);</li>
<li>arm();</li>
</ul>

<p>Once you add those to the next lines the program should work and the esc shouldn't just beep and actually get the motor to spin</p>
