Basic ESC with potentiometer issues

I’m attempting to get my T200 thrusters working, I have two of them and two basic ESC. Each ESC is getting power from a seperate 14.8V battery, the thrusters work so Im not exactly sure what the issue is. When I run the example code Control the Basic ESC with Potentiometer and Arduino, my ESC makes the correct beeps notifying me that its on, and the it is delayed for 7000 microseconds, but when I turn the potentiometer nothing happens. When I turn the knob all the way left or right, the thruster turns on full power and doesn’t turn off unless I unplug the arduino. I tried 4 potentiometers and 3 different arduinos. The thrusters and ESC work fine, I think its either my code or the potentiometer but wanted to see if anyone had a fix or has seen this issue before. Below is my code for two thrusters controlled by the same potentiometer. I would like to eventually replace the potentiometer with a joystick at some point. Thanks!

#include <Servo.h>

byte servoPin1 = 9; 
byte servoPin2 = 10;
byte poteniometerPin = A0;
Servo servo1;
Servo servo2;

void setup() {

  servo1.attach(servoPin1);
  servo2.attach(servoPin2);

  servo1.writeMicroseconds(1500);
  servo2.writeMicroseconds(1500);

  delay(7000);
}

void loop() {

  int potVal = analogRead(poteniometerPin);

  int pwmVal = map(potVal, 0, 1023, 1100, 1900);

  servo1.writeMicroseconds(pwmVal);
  servo2.writeMicroseconds(pwmVal);
}

Hi @bkeith -
Please verify that the ground of your Arduino is connected to the ground of both ESCs connected to it - the control signal needs to be referenced to the same potential.

The potentiometer and both ESCs ground are in the ground pins of the Arduino. I’m not sure if it matters but it’s an Arduino Mega 2560. I’ve tried an Uno as well. The ground and power for the battery are well connected. From the thruster to the ESC I have blue to blue, green to green, and white to white. White wire from ESC is in PWM9 and 10, both black wires go to ground on the Arduino. The potentiometer has a black, red, and yellow wire. Yellow goes to A0, black goes to ground, and red goes to 5V on the Arduino. I’ve checked these connections multiple times. Thanks for the response!

Does it matter which rail the ground is in? On the mega if your looking at it with ports to the top, there is one ground port on the right and two on the left, the ESCs are on the left and potentiometer on the right if that matters. Thanks again.