Using an HCSR04 sensor to create signal to motor driver BTS7960

Hi all,
I am trying to make an interactive installation where motor powered movement is activated as viewers get closer to the exhibit. I will endeavor to add some limit switches later. the movement does not need to be precise.
I have put together some code (several attempts - not one of my strengths) and get a reading from the serial monitor, but only a barely audible response from the motor.
Any advice would be much appreciated.

include <NHCSR04.h>

int maxCentimeters = 500; //Default is 100cm. This is to prevent too long ping

int baudrate = 9600;

int triggerPin = 13;
int echoPin = 12;

SR04 sensor(triggerPin, echoPin, maxCentimeters);

double cm;
//Initialize other motor control pins;
int EnableMotorUp   = 3;
int EnableMotorDown = 4;
int PwmSignalUp     = 5;
int PwmSignalDown   = 6;

int oldvalue = 0; //create variable for comparing input signalfrom sensor

void setup()
{
  Serial.begin(baudrate);  // We initialize serial connection so that we could print values from sensor.

  // Setup the outputs.
  pinMode(EnableMotorUp, OUTPUT);
  digitalWrite(EnableMotorUp, HIGH);
  pinMode(EnableMotorDown, OUTPUT);
  digitalWrite(EnableMotorDown, HIGH);
  pinMode(PwmSignalUp, OUTPUT);
  pinMode(PwmSignalDown, OUTPUT);

}

void loop()
{
  cm = sensor.centimeters();
  Serial.print("cm: ");
  Serial.println(cm);

  int val = sensor.centimeters(); // Read value from sensor
  
  //If the reading from the sensor is greater than the previous value
  if (val < oldvalue)
  {
    digitalWrite(PwmSignalUp, HIGH);
    digitalWrite(PwmSignalDown, LOW);
  }
  else if (val > oldvalue)
  {
    digitalWrite(PwmSignalDown, HIGH);
    digitalWrite(PwmSignalUp, LOW);
  }
  else (val == oldvalue);//STOP MOTOR
  {
    digitalWrite(PwmSignalDown, LOW);
    digitalWrite(PwmSignalUp, LOW);
  }
  oldvalue = val;
}

You won't like it, but START OVER with just coding to make the HCSR 04 work and display the raw microsecond results from the echo. Test that with all kinds of material producing the echo. Quantify what produces a good echo and what does not. People DO NOT produce a good echo.

When you can detect an echo from a people, then work on additional code for the motor.

Post your schematic and consider a PIR sensor.