Currently it turns the set amount, waits and then turns again continuously. Just trying to figure code to make the motor stop after the x-amount of steps. Speed seems ok, will have to test on site though. I spent couple of hours at local supplier today who convinced me that the way forward would be as follow: Thank you again for all the help, it is greatly appreciated. have tried various code examples, but the code above seems to be the only code that does indeed tuen the motor. I assume the speed in this case is detemined by the analogwrite(11,255), but the motor would not turn if I comment those out. I have tried several things including commands such as // set the speed at 60 rpm:īut without any success. PinMode(8, OUTPUT) //brake (disable) CH BĭigitalWrite(12, HIGH) //Sets direction of CH AĭigitalWrite(13, LOW) //Sets direction of CH BĭigitalWrite(12, LOW) //Sets direction of CH AĭigitalWrite(13, HIGH) //Sets direction of CH B PinMode(9, OUTPUT) //brake (disable) CH A PinMode(13, OUTPUT) //CH B - HIGH = forwards and LOW = backwards? PinMode(12, OUTPUT) //CH A - HIGH = forwards and LOW = backwards? The code running the motor is below: int delaylegnth = 20 I am extremely new to Arduino and am trying to increase the speed on my stepper motor application.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |