-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added idle() method to power down a motor to save energy or allow manual rotation of motor #11
base: master
Are you sure you want to change the base?
Conversation
The idle method will power down the stepper motor pins to either save power or allow the motor to be manually rotated.
Added an idle() method to power down the stepper motor. This is useful for power savings, or if the motor needs to be manually rotated.
@@ -14,6 +14,7 @@ Stepper KEYWORD1 Stepper | |||
|
|||
step KEYWORD2 | |||
setSpeed KEYWORD2 | |||
idle KEYWORD2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to use a true tab separator between the keyword and identifier, not spaces.
@@ -1,5 +1,5 @@ | |||
/* | |||
* Stepper.cpp - Stepper library for Wiring/Arduino - Version 1.1.0 | |||
* Stepper.cpp - Stepper library for Wiring/Arduino - Version 1.1.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version is actually already at 1.1.3. A non-breaking API change should bump the minor version so the next release would be 1.2.0. But I think it's best to let Arduino handle the versioning since you don't necessarily want a version bump for every commit, only every release.
@@ -8,6 +8,7 @@ | |||
* High-speed stepping mod by Eugene Kozlenko | |||
* Timer rollover fix by Eugene Kozlenko | |||
* Five phase five wire (1.1.0) by Ryan Orendorff | |||
* add idle method (1.1.1) by Darren Clark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment regarding version.
@@ -8,6 +8,7 @@ | |||
* High-speed stepping mod by Eugene Kozlenko | |||
* Timer rollover fix by Eugene Kozlenko | |||
* Five phase five wire (1.1.0) by Ryan Orendorff | |||
* add idle method (1.1.1) by Darren Clark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment regarding version.
/* | ||
version() returns the version of the library: | ||
*/ | ||
int Stepper::version(void) | ||
{ | ||
return 5; | ||
return 6; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See previous comment regarding version.
Hi, I had the same issue, as can bee seen here in the forum. However, I'd use a more compact code in the method itself:
|
I second this commit. |
BiggRanger seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
I've added an idle() method to power down the stepper motor pins in order to save energy or in my case allow a motor with a hand wheel to be manually operated. The only risk is if someone is keeping track of position by counting steps, while the motor is idle the motor may change position.