![]() This is weird, why would it move back if I have no such code?.What actually results is that it moves a step to the left, then a step to the right, and repeats this. MyStepper.step( (5*200)/360 ) //this should move it around 2.7 steps at a time tSpeed(5) //this is the RMP, meaning 1000 steps per minute I believe. Int stepCount = 0 // number of steps the motor has takenÄigitalWrite(dirPin,HIGH) //Enables the motor to move in a particular direction Stepper myStepper(stepsPerRevolution, 2,3) So right now I am trying to get the NEMA 17 to rotate with constant speed in only 1 direction using this code: #include Ĭonst int stepsPerRevolution = 200 // change this to fit the number of steps per revolution I tried to remove the PM part altogether and only use static code to make the motor rotate continuously in one direction at a fixed speed. Nevertheless, if the PM is too low or too high, the motor jerks around kind of like it can't keep up with itself. ![]() ![]() For example, I try to use the potentiometer code example in the link, and when the PM is around halfway power the motor spins smoothly in one direction. Everything seems to work relatively well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |