Adafruit_StepperMotor - Energize stepper without moving?

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
thor73
 
Posts: 5
Joined: Thu Oct 03, 2019 9:58 am

Adafruit_StepperMotor - Energize stepper without moving?

Post by thor73 »

I am using a motor shield v2.3 in conjunction with the Adafruit_StepperMotor library and the AccelStepper library.

Is there a way to energize the stepper without moving it? The tutorial states "The step() function is synchronous and does not return until all steps are complete. When complete the motor remains powered to apply "holding torque" to maintain position." I would like to be able to maintain holding torque when the system starts up, but without moving the stepper first.

Thanks!

User avatar
adafruit_support_bill
 
Posts: 88140
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit_StepperMotor - Energize stepper without moving?

Post by adafruit_support_bill »

The library does not have a function that will do that. One approach would be to do one microstep forward and back at startup to leave the motor energized.

User avatar
thor73
 
Posts: 5
Joined: Thu Oct 03, 2019 9:58 am

Re: Adafruit_StepperMotor - Energize stepper without moving?

Post by thor73 »

Thanks, that was what I ended up doing. Works fine!

User avatar
adafruit_support_bill
 
Posts: 88140
Joined: Sat Feb 07, 2009 10:11 am

Re: Adafruit_StepperMotor - Energize stepper without moving?

Post by adafruit_support_bill »

Good to hear. Thanks for the update.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”