i have a 35A ESC and a outrunner BLDC.. i have connected the red and black wires of the ESC to a 9V battery for power supply . On the other side ive connected the red black and yellow wires of the BLDC. The white wire of 3 pin connector is connected to pin 9 and black to ground. i havent connected the red wire as the arduino is powered by a computer.
this is the program i ran
#include <Servo.h>
int i=0;
Servo esc;
void setup()
{
esc.attach(9);
}
void loop()
{
while(i<179)
{
esc.write(i);
i++;
}
if (i == 179)
{
i=0;
}
}
the motor is not running.
im new to electronics.. could someone tell me what i did wrong