UCN5804B BiMOS II Unipolar Stepper-Motor Translator/Driver

Used Products:

1. Arduino UNO
2. UCN5804B

Code:

#define enablePin 6 #define directionPin 5 #define stepInPin 4 #define halStepPin 3 #define onePhasePin 2 #define del 1000 void setup() { Serial.begin(9600); pinMode(enablePin, OUTPUT); pinMode(directionPin, OUTPUT); pinMode(stepInPin, OUTPUT); pinMode(halStepPin, OUTPUT); pinMode(onePhasePin, OUTPUT); } void loop() { digitalWrite(enablePin, LOW); digitalWrite(directionPin, 1); digitalWrite(halStepPin, LOW); digitalWrite(halStepPin, 1); delay(del); }