Arduino Brushless Motor Control - Issue with brushless motor speed

Over the last few months I've been building a self-leveling PID system with 2 brushless DC motors connected to basically a teeter totter. Recently I've been having trouble with the control of the motors. So, I wrote a very basic program to take input from a potentiometer and map it to a range of 1000 to 1050 microsecond PWM signal and send it to each motor.

The issue I've been having is that when I upload the code to the Arduino the motors both go full throttle instantaneously despite the 5 second delay in setup() and the fact that I have the potentiometer set to a 1000 microsecond pulse width which shouldn't allow the motors to move.

The setup is identical to the schematic I uploaded except I'm using an Arduino Nano, a different gyro sensor (which in this case doesn't matter as I'm only dealing with the motors), a 14.8V LiPo battery, and the correct ESCs for the battery.

Here's the code:

#include <Servo.h>
#include <Wire.h>

// Servo motors
Servo right_prop;
Servo left_prop;

void setup() {
  Wire.begin();
  Wire.beginTransmission(0x68);
  Wire.write(0x6B);
  Wire.write(0);
  Wire.endTransmission(true);
  left_prop.attach(3);
  right_prop.attach(5);

  Serial.begin(115200);
  delay(5000);
}

void loop() {
  int throttle = map(analogRead(A0), 0, 1023, 1000, 1050);
  Serial.println(throttle);
  left_prop.writeMicroseconds(throttle);
  right_prop.writeMicroseconds(throttle);
  delay(10);
}

During an upload the controller receives its new code and is not doing anything good. All outputs go to a defined state during that process. I can't tell whether that state is tristate, high or low even if I am an UNO guy.
I never experienced any wild actions during loading a new version to the UNOs.

.

When you do the .attach() a value equivalent to writeMicroseconds(1500) is automatically written to the ESC. If you want that to be 1000 then you can override the default by doing your own writeMicroseconds(1000) in setup() BEFORE the attach().

Steve

Thanks you guys! I wrote 1000 to both motors in setup and the issue was fixed.