The parts i'm using:
A2212/6t 2200KV brushless motor
T-rex 450 V2 ESC
12V AC-DC adapter, 2A
So this is my code:
#include <Servo.h>
Servo esc;
void setup()
{
esc.attach(9);
Serial.begin(9600);
}
void loop()
{
esc.write(0);
Serial.println("0");
delay(5000);
esc.write(100);
Serial.println("100");
delay(5000);
/*esc.write(20);
Serial.println("0");
delay(5000);
esc.write(20);
Serial.println("20");
delay(5000);*/
}
When i run a arduino program with only esc.write(100);, it doesn't work, but after that, when i upload this program, this program works for a few seconds.
The first time it writes 100, it works for a few seconds, after that, the ESC restarts. Doesn't matter which value i give it.
Then, when the value is 0, it beeps fast. When the value is 100, it gives a beep with 2 beeps following it.
It's a bit complicated, but i hope that i explained it good.
Thanks