hi I am hoping someone can help me here I am very new to all this stuff and for a project I want to build an arduino controlled 3 axis cnc machine how ever I have connected a single motor to a driver and used a small piece of test scrpt to get the motor to rotate but it keeps stalling and just vibrating. I have come across some information about it being to do eith the frequency but im getting lost on what I need to do any help would be great.
Motor: NEMA 23
Driver: CW5045
Arduin mega
and here is the code I used.
const int pul = 7; //set pulse at pin 7
const int dir = 4; //set direction at pin 4