Step(true, X_DIR, X_STP, stps) //X, Counterclockwise Step(false, Z_DIR, Z_STP, stps) //Z, Clockwise Step(false, Y_DIR, Y_STP, stps) //Y, Clockwise Step(false, X_DIR, X_STP, stps) //X, Clockwise PinMode(Z_DIR, OUTPUT) pinMode(Z_STP, OUTPUT) PinMode(Y_DIR, OUTPUT) pinMode(Y_STP, OUTPUT) PinMode(X_DIR, OUTPUT) pinMode(X_STP, OUTPUT) Void step(boolean dir, byte dirPin, byte stepperPin, int steps) Int delayTime=30 //Delay between each pause (uS) The code I tried to control the stepper motor with, is from this site And is inserted here: #define EN 8 One NEMA 17 bipolar Stepper motor, model 42BYGH47-401A Power supplied by external power supply AC TO DC 12V 3A Adapter Power supplied by my PC via USBĬNC Shield. Hopefully someone out here can help me out.Īrduino Uno. I have been searching for solutions on the internet and tried several configurations, but it just doesn’t work. I am trying to control a stepper motor with my Arduino Uno, with a CNC shield and a DRV8825 stepper driver, but I am having troubles for quite some time now.