EMC-2-Arduino CNC/Robotics control firmware.

You first measure the winding resistances (which will also identify which
windings are which and where the common wires are).

If its low impedance (< 5 ohms) and not 5-wire you then get a bipolar chopper driver
that can handle the current (finding the current rating might be an issue too) and
an appropriate 24, 36, 48, or 80V supply (depends on what the driver can handle and
what performance you need).

If its high impedance (10 ohms or more) and not 4 wire then use unipolar drive and
a supply voltage matched to the windings, but don't expect much speed.

Most stepper drivers have step, direction and enable inputs, often opto-isolated.