ESC

Heres the code with just the servo and motor in it, I'm using a relay so that I don't pass 14.8V from the battery through my Arduino, I may change this when I have everything working but for now it allows me to turn the battery on and off for the arming sequence when I was trying to figure out the correct sequence/times.

The throttle calibration part of the manual I haven't been able to replicate, but it says the default is a 1000-2000us signial so I think im ok there.

And just to repeat myself it does work but it will not change speed, it stays at a constant speed even if I write a different speed amount to it.

Thanks

#include <Servo.h>

//init relay pin and ESC
 int relay = 8;
 Servo m1;


void armMotor(){
//turns the relay on 
digitalWrite(relay, HIGH); 
Serial.print("Beggining arming sequence\n");
delay(2000);
m1.write(1400);
Serial.print("Throttle signial sent\n");
delay(2000);
Serial.print("Zero throttle signial sent\n");
m1.write(1000);
delay(2000);
Serial.print("Motor is ready, arming sequence complete\n");
}



void motorOFF(){
//turns the relay off
Serial.print("OFF\n");
digitalWrite(relay, LOW);
delay(3000);
}

void setup() {
// put your setup code here, to run once:

//attachs the esc with the digital 9 pin, min and max value.
m1.attach(9,1000,2000);





}





void loop() {
// put your main code here, to run repeatedly:


  //arms the motor
armMotor();


  

//turns the motor off
motorOFF();


}