Brushless Motor jitters, can't control

Hello!
I am trying to control a brushless motor via an ESC using radio control.
Whenever I try to throttle up, the motors beep for a little, then jitter while heating up quickly.
I have swapped escs and motors but no difference.
I also have tried using LeftMotor.write(number from 0-180) and also LeftMotor.writeMilliseconds(number from 1000-2000)
I would like some help
Thanks!

Here is the code. I am programming it to control a flying wing.

#include <Servo.h>

Servo ElavonLeft;
Servo ElavonRight;
Servo RightMotor;
Servo LeftMotor;

//ServoPositions
int ElavonLeftPos = 0;
int ElavonRightPos = 0;

//Interstage
int ElevatorInter = 0;
int AileronInter = 0;
int ThrottleInter = 0;
int RudderInter = 0;

//MotorPower
int LeftMotorPower = 0;
int RightMotorPower = 0;

// experimental
//float InterpolateElevatorPos = 0;
//float InterpolateAileronPos = 0;
//const float beta = 0.5;

//ServoPins
const int ElavonLeftPin = 12;
const int ElavonRightPin = 13;
const int LeftMotorPin = 2;
const int RightMotorPin = 7;
//PWM input from Rx
const int ElevatorPin = 6;
const int AileronPin = 9;
const int RudderPin = 5;
const int ThrottlePin = 11;
const int ModeSwitchPin = 3;

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
ElavonLeft.attach(ElavonLeftPin);
ElavonRight.attach(ElavonRightPin);
LeftMotor.attach(LeftMotorPin);
RightMotor.attach(RightMotorPin);

}

void loop() {
// Read the Positions
int AuxStickPosition = pulseIn(ModeSwitchPin, HIGH, 25000);

if (AuxStickPosition < 1300) {

int ElevatorStickPosition = pulseIn(ElevatorPin, HIGH, 25000);
int RudderStickPosition = pulseIn(RudderPin, HIGH, 25000);
int AileronStickPosition = pulseIn(AileronPin, HIGH, 25000);
int ThrottleStickPosition = pulseIn(ThrottlePin, HIGH, 25000);
int AuxStickPosition = pulseIn(ModeSwitchPin, HIGH, 25000);

// experimental interpolation
//InterpolateElevatorPos = (beta * (float)ElevatorStickPosition) + ((1 - beta) * InterpolateElevatorPos);
//ElevatorStickPosition = (int) InterpolateElevatorPos;
//InterpolateAileronPos = (beta * (float)AileronStickPosition) + ((1 - beta) * InterpolateAileronPos);
//AileronStickPosition = (int) InterpolateAileronPos;

//Read and convert
//RudderInter = map(RudderStickPosition, 1000,2000, -150, 150);
AileronInter = map(AileronStickPosition, 1000, 2000, -150, 150);
// ThrottleInter = map(ThrottleStickPosition, 1000, 2000, -150, 150);
ElevatorInter = map(ElevatorStickPosition, 1000, 2000, -150, 150);

//wut

ElavonLeftPos = map(AileronInter - ElevatorInter, -310, 310, 0, 180);
ElavonRightPos = map(AileronInter + ElevatorInter, -310, 310, 0, 180);
// RightMotorPower = map(ThrottleInter + RudderInter, -150, 150, 1000, 2000);
// LeftMotorPower = map(ThrottleInter - RudderInter, -150, 150, 1000, 2000);

LeftMotorPower = ThrottleStickPosition;

//Constrain

ElavonLeftPos = constrain(ElavonLeftPos, 0, 180);
ElavonRightPos = constrain(ElavonRightPos, 0, 180);
LeftMotorPower = constrain(LeftMotorPower, 0, 2000);
RightMotorPower = constrain(RightMotorPower, 0, 2000);

ElavonLeft.write(ElavonLeftPos);
ElavonRight.write(ElavonRightPos);
LeftMotor.writeMicroseconds(LeftMotorPower);
RightMotor.writeMicroseconds(RightMotorPower);

Serial.println(ElevatorStickPosition);

delay(2);

}

else {

int AuxStickPosition = pulseIn(ModeSwitchPin, HIGH, 25000);

LeftMotor.write(0);
RightMotor.write(0);

delay(5);

}
}

Try to write a much simpler test sketch that only runs the motors at some reduced, fixed speed.

Please edit your post to add code tags, as described in How to use this forum.

It is always best to get small pieces of the project working separately, before throwing everything into the pot. In this case, start by learning to control one motor, with the bare minimum of code.

Jitter and heating suggests a fundamental problem. Did you forget to connect all the grounds?

Alrighty. Thanks for the advice!
Sorry for dumping the code on you. I'm new to this...

I made some smaller test code, and it gives the same results. Jitter and heating. All grounds were connected, everything.
Here is the Code

#include <Servo.h>
Servo Motor;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Motor.attach(2);
}
void loop() {
// put your main code here, to run repeatedly:
int sPos = pulseIn(11, HIGH, 25000);
sPos = constrain(sPos, 0, 2000);
sPos = map(sPos, 1000, 2000, 0, 180);
Motor.write(sPos);
Serial.println(sPos);
delay(3);

}

The code looks o.k. Does your Serial.print show that the values you're writing to the ESC are what you're expecting?

Can you provide some details of the components you're using. What motor/ESC? And what are you powering everything with? A simple wiring diagram would probably help. What load is there on the motor? E.g. propeller size or whatever.

The combination of jittering i.e. failing to start plus getting hot sounds like either insufficient power or the motor stalling. But an ESC which is configured incorrectly might also do it.

Steve