Help with maxuino script

Below is a script i slightly modified for a stepper motor using Maxuino » Page not found library

#include <StepperDriver.h>

const int stepsPerRevolution = 200;
StepperDriver myStepper;
//stepper driver is at half step resolution, meaning instead of 200 steps for one revolution, it takes 400 steps for one revolution
// threaded rod has a 1.25 mm pitch. motor moves one revolution in
int analogPin = 0;
int val; // variable to read the value from the analog pin
int downPin=3;
int upPin=4;
int down;
int up;

void setup() {

myStepper.setStep(200, 10,12);
pinMode(downPin,INPUT);
pinMode(upPin,INPUT);
}

void loop() {

down=digitalRead(downPin);
up=digitalRead(upPin);

if (down==HIGH)
{down=-1;}
else
{down=0;}
if (up==HIGH)
{up=1;}
else
{up=0;}

val = analogRead(analogPin); // read the input pin
val = map(val, 0, 1023, 400, 1600 );
myStepper.setSpeed(val);//sets speed in rev/minuite

if (myStepper.update() == 0)
{myStepper.step(downstepsPerRevolution+upstepsPerRevolution);
//{myStepper.step(stepsPerRevolution);

}
}

now that i figured out the exact speed i want the motor to run when going up and down, i dont want to use my potentiometer anymore. When i go down, i want the set speed to be 400, and when going up, the speed to be 1600.

How do i set a different speed for a the respective direction instead of using the val hooked up to the potentiometer???

How do i set a different speed for a the respective direction instead of using the val hooked up to the potentiometer???

Quit reading from the potentiometer. Simply assign the value to val that you want to use.