I've revised the code to suit my application and my irresistible urge to change things.
I've used an 8255 driver as I had them to hand and I've wired the microstepping up to the arduino so I can see what difference a change in stepsize makes and it's easy to reverse in code the motor direction after soldering everything.
this particular code is using 1/16th steps and a 16t and 40t pulleys, so needs to step 2.5x faster
#define STEP_PIN 2
#define DIR_PIN 3
#define Mzero 10
#define Mone 11
#define Mtwo 12
#define Denable 5
void setup() {
digitalWrite(DIR_PIN, HIGH);
digitalWrite(STEP_PIN, LOW);
pinMode(DIR_PIN, OUTPUT);
pinMode(STEP_PIN, OUTPUT);
digitalWrite(Mzero, LOW);
digitalWrite(Mone, LOW);
digitalWrite(Mtwo, HIGH);
digitalWrite(Denable, LOW);
}
void loop() {
digitalWrite(STEP_PIN,HIGH);
delay(37);
digitalWrite(STEP_PIN,LOW);
delay (38);
}