Controllig a brushed DC motor with a 50a pwm speed control using arduino

I am upgrading the control system for a dc motor which drives a seeder.
The old system was simply a speed controller,

and a hall effect sensor displaying rpm to the operator. It was up to the operator to continually make adjustments to the speed controller pot to maintain rpm under varying conditions.
What I would like to do is control the same speed controller with an arduino which varies the output to maintain a preselected rpm. Set and forget. I hope.
Being a simple minded person, I assumed that if I measure the voltage range on the centre pin of the adjustment pot of the speed controller, and then reproduced that voltage range on an output pin of the arduino uno, I could simply remove the pot and connect arduino out and gnd to the speed controller.
This does not seem to be the case. >:(
Can anybody suggest how I can take control of this speed control with an arduino?

sketch attached for reference.
This is still a work in progress.

/*
 * This controller is to replace the standard controller found on "Seabrook Seeders". 
 * The standard controllers do not have motor feedback to the speed controller
 * despite having a hall effect sensor fitted to the output shaft. Therefore, any
 * variation in voltage or load would destroy any hope of maintaining consistant RPM 
 * thus making calibration impossible.
 * This controller allows the user to set the required rpm via up/down buttons and 
 * the controller then adjusts the esc to maintain the selected rpm. If the selected 
 * rpms are unable to be maintained due to motor overload, a warning buzzer will sound and a message will 
 * appear on the screen.
 */
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins. 
//Non standard pins are used. Need to be changed for DFRobot lcd.
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

// define some values used by the panel and buttons

int lcd_key     = 0;
int adc_key_in  = 0;

#define btnRIGHT  0
#define btnUP     1
#define btnDOWN   2
#define btnLEFT   3
#define btnSELECT 4
#define btnNONE   5

int read_LCD_buttons() {              // read the buttons
  adc_key_in = analogRead(0);       // read the value from the sensor
  
  if (adc_key_in>1000) return btnNONE;

  if (adc_key_in < 50)   return btnRIGHT;
  if (adc_key_in < 195)  return btnUP;
  if (adc_key_in < 380)  return btnDOWN;
  if (adc_key_in < 555)  return btnLEFT;
  if (adc_key_in < 790)  return btnSELECT;

  return btnNONE;                // when all others fail, return this.
}
//Define integers
// digital pin 13 has a hall effect sensor attached to it.
  int sensor = 13;
// Analog (pwm) output pin 11 that the ESC is attached to
  int escOut = 11;
  int escSet;

//Define RPM variables.
volatile byte rpmcount;
unsigned int rpm;
unsigned long timeold;

  //Define strings
  String st1="Req'd RPM ";
  String st2="Actual RPM ";
  
void rpm_fun(){
rpmcount++;
}

void setup() {
  // set up the LCD.
    lcd.begin(16, 2);
    lcd.setCursor(0, 0);
    lcd.print("Seedr Controller");
    lcd.setCursor(1, 1);
    lcd.print("by Chris Dalby");
    delay(5000);
    lcd.clear();
    lcd.print("Set RPM");
    // initialize the serial communications:
    Serial.begin(9600);
    pinMode(sensor, INPUT);
    pinMode(escOut, OUTPUT);
    /*
   //Interrupt 0 is digital pin 2, so that is where the IR detector is connected
   //Triggers on FALLING (change from HIGH to LOW)
   attachInterrupt(0, rpm_fun, FALLING);

   //Turn on IR LED
   pinMode(ledPin, OUTPUT);
   digitalWrite(ledPin, HIGH);
     */
    
    
    escSet=25;
    rpmcount = 0;
    rpm = 0;
    timeold = 0;
  
}

void loop() {
  
  delay(200);
  lcd.setCursor(0,0);
  

  //Read keypad and adjust escSet.
  
  lcd_key = read_LCD_buttons();   // read the buttons
 
   switch (lcd_key){               // depending on which button was pushed, adjust escSet up or down.

       case btnRIGHT:{             
            break;
       }

       case btnLEFT:{
            break;
       }    
 
       case btnUP:{             
            int (escSet=escSet+1);
            //Trying to set upper limit of RPM to 60. 
           /* if (escSet >=60);{
              int (escSet=60);
            }*/
            lcd.clear();
            lcd.print(st1);
            lcd.print(escSet);
            break;
       }

       case btnDOWN:{
            int (escSet=escSet-1);
            //Trying to set lower limit of 5.
          /*  if (escSet <=5);{
              int (escSet=5);
            }*/
            lcd.clear();
            lcd.print(st1);
            lcd.print(escSet);
             break;
       }

       case btnSELECT:{
            break;
       }
   }
   
    //Don't process interrupts during calculations.
   detachInterrupt(0);
    //Note that this needs to be adjusted to suit number of slots in disc and 200ms time window.
   rpm = 30*1000/(millis() - timeold)*rpmcount;
   timeold = millis();
   rpmcount = 0;

   lcd.setCursor(0,1);
   lcd.print(st2);
   lcd.print(rpm);
   
  //Need to develope code for setting escOut according to rpm:escSet.
  
   if (rpm>escSet){
      escOut=escOut-1;
   }
   else if (rpm<escOut){
      escOut=escOut+1;
   }
   else 
   {
   escOut=escOut;
   }
   //escOut limited to 100/255 to deliver max Vout of 1.95v for esc.
   if (escOut>100){
    escOut=100;
   }
  //Code to send escOut to pin 11
  Serial.println(escOut);
  analogWrite(11,escOut);
   
}

Maybe a digital potentiometer might be what you need?

example. https://www.sparkfun.com/products/10613

Definitely an option thanks alka. Great!

I just discovered this esc has a “hall effect” input for control. Problem solved.