Pololu high-power motor driver 18v15 and arduino

Hello

I am using pololu high-power motor driver 18v15 and I am controlling the speed with potentiometer through arduino, from my understanding of the driver is that the PWM pin is controlling the speed and DIR controlling the direction, but what I do not understand is that why when I am sending pwm from arduino to the driver pwm and setting DIR to high or low, the motor is nont working as it suppose to.
could somebody help me with that? what should I put on DIr pin (PWM with duty cycle or just HIgh and low), and any past experience with that will help.

Thanks.

I got the direction to work after connecting the ground of the driver with the ground of the arduino.
code work fine but one small problem, I can not switch from one direction to the other using a switch.
direction only work when I change it on the code from high to low.

Hello.

As stated on the product page for the High-Power Motor Driver 18v15, the DIR pin takes a digital high or low signal. Since it works when connected to the Arduino, but not your switch, you might want to check your wiring. If you post a picture of how you have things connected or a diagram that shows all of your connections, I can take a look and see if I notice anything that might be causing the issue.

Grant