Cryoschrome
Member
Hi,
Hardware: Teensy3.6
Software: Arduino using Ubuntu 20.04
I was experimenting with teensyStep library and made some observations that I thought was odd and would like some clarification.
I modified the "HelloStepper" example to use StepControl::moveAysnc()
When executing the code, the motor initially starts at max speed, but in equal intervals of time for a small duration slows down and speeds back up again. The frequency of motor slow down increases with decrease in delay time. Without the delay the motor does not move at all.
With StepControl::move(), setting setTargetRel(40000), moves the motor 180 degrees, whereas when executing the above code, the motor moves only about 90 degrees. Even after increasing the setTargetRel value to 80000 (360 degrees), the motor moves about 90 degrees only.
Any help is appreciated.
Thank you.
Hardware: Teensy3.6
Software: Arduino using Ubuntu 20.04
I was experimenting with teensyStep library and made some observations that I thought was odd and would like some clarification.
I modified the "HelloStepper" example to use StepControl::moveAysnc()
Code:
#include "TeensyStep.h"
Stepper motor(2, 3); // STEP pin: 2, DIR pin: 3
StepControl controller; // Use default settings
void setup()
{
motor.setStepPinPolarity(LOW);
motor.setInverseRotation(true);
motor.setAcceleration(3500);
motor.setMaxSpeed(3500);
motor.setTargetRel(40000)
}
void loop()
{
controller.moveAsync(motor); // Do the move
delay(2000);
}
With StepControl::move(), setting setTargetRel(40000), moves the motor 180 degrees, whereas when executing the above code, the motor moves only about 90 degrees. Even after increasing the setTargetRel value to 80000 (360 degrees), the motor moves about 90 degrees only.
Any help is appreciated.
Thank you.