Skip to content

Commit e98e0f5

Browse files
authored
A new function to idle the motor after stepping
A new function that allow setting the idle option to power down all the motor coils after stepping, in order to reduce power and heat. That also allows manual rotation of the motor.
1 parent d35936c commit e98e0f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Stepper.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ class Stepper {
9595

9696
// mover method:
9797
void step(int number_of_steps);
98+
99+
// Power down all coils after stepping, to reduce heat, power and allow manuall rotation.
100+
void idelAfterStep(bool idle);
98101

99102
int version(void);
100103

@@ -106,6 +109,7 @@ class Stepper {
106109
int number_of_steps; // total number of steps this motor can take
107110
int pin_count; // how many pins are in use.
108111
int step_number; // which step the motor is on
112+
bool idle; // Power down all coils after done stepping
109113

110114
// motor pin numbers:
111115
int motor_pin_1;

0 commit comments

Comments
 (0)