I'm positive that this is due to my misunderstanding of how the library works, but I'm having a hard time trying to figure out how to properly use the constant speed methods. Considering this is a 200 step motor and setSpeed is steps per second you'd think this would whip the motor around fairly quick. I figured this made sense because it's set at a speed of 50, so I tried turning up the speed: tSpeed(200) īut the speed still seems to be the same speed. I uploaded it to my arduino and it's working, the shaft is rotating, but it's doing it really slow. (I'm using the adafruit stepper motor wing) I know for parts or all of project I'll want to use constant speed, so I popped up the constant speed demo: #include Īdafruit_MotorShield AFMS = Adafruit_MotorShield() Īdafruit_StepperMotor *myStepper1 = AFMS.getStepper(200, 2) ĪccelStepper Astepper1(forwardstep1, backwardstep1) ĪFMS.begin() // create with the default frequency 1.6KHz I'm able to get the stepper motors running with the basic examples that use acceleration. I'm starting to learn the AccelStepper library for controlling stepper motors for a project I'm working on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |