Easy Driver and DM542A driver pins

Hi people.

Right now I am trying to make sketch to control direction of STEP motor with touch switch sensor. I have found sketch for Easy Step driver, but I have DM542A driver.

I have this issue: DM542A have pins: PUL+, PUL-, DIR+, DIR- and ENBL+ ;ENBL-

I cant figure out which pins on these sketch match pins on DM542 driver

define step_pin 3 // Define pin 3 as the steps pin

define dir_pin 2 // Define pin 2 as the direction pin

define MS1 5 // Define pin 5 as "MS1"

define MS2 4 // Define pin 4 as "MS2"

define button1 7

define button2 8

Stepper drivers use opto isolated inputs, each signal has 2 wires, such as DIR+/DIR- which are connected to an opto-isolator input (with series resistor usually).

So to activate the DIR input, connect DIR- to GND and DIR+ to an Arduino pin.

You can connect all the - inputs together to Arduino gnd and use Arduino pins to PUL+/DIR+ and ENBL+ (if needed)

Connect the Pul-. Dir- and ENBL- to Arduino GND. Then use the + connections for the step, direction and enable signals.

The MSx pins are for microstepping and you have not said if your driver can do that. Also the EasyDriver defaults to microstepping whereas most other drivers default to single-stepping.

...R