Help getting Stepper Driver going?

Hi All,

My stepper motor and driver arrived today, after some help from a forum member in an earlier thread I think I have it hooked up correctly. But at the moment all I can get out of the motor is 2 steps. I'm just using a simple code as I understand all I need to do is send pulses of 5v to the optically isolated switches on the driver and it will do the rest. I have fiddled with the enable mode, but it makes no difference and the same with direction, I still only get 2 steps. Is my code overly simple?

const int pul =  7;  //set pulse at pin 7 
const int dir =  4;  //set direction at pin 4

void setup() {
  pinMode(pul, OUTPUT); 
  pinMode(dir, OUTPUT);    

void loop(){
  digitalWrite(dir, HIGH);
  digitalWrite(pul, HIGH);

Here is the datasheet for the driver.

I hope that the fact that it does do a few steps means it is hooked up right and its just bad code.

A pulse has a start time and a stop time. You are turning the pin on, and leaving it on. Try turning the pin(s) off after the delay.

Thanks Paul, that did the trick. Its spinning away happily now!