Thanks for the advice on that but it still did not help reverse the direction of the motor.
What I am now getting is it still turns in the counter-clockwise direction whenever I press up or down on the joystick BUT instead of going at the same speed when I press up the motor turns fast and press down it slowly turns at more than half the speed
I tried seeing if inserting a negative sign in speed_Y would change the direction
if (joystickValue_Y < Y_THRESHHOLD_LOW) {
digitalWrite(pinENA,LOW);// enable
digitalWrite(pinDIR, LOW); // Other direction
digitalWrite(pinSTEP,HIGH);
delayMicroseconds(2);
digitalWrite(pinSTEP,LOW);
delayMicroseconds(speed_Y);
}
so instead of delayMicroseconds(speed_Y); it would be delayMicroseconds(-speed_Y); but all that it did was make it spin at the same speed as pressing up on the joystick
any more thoughts?