Skip to content

Commit 903cfbf

Browse files
authored
Merge pull request #13 from Hello1024/patch-1
Yield while stepper motor is stepping
2 parents 621d4b2 + b2b4371 commit 903cfbf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Stepper.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ void Stepper::step(int steps_to_move)
222222
stepMotor(this->step_number % 10);
223223
else
224224
stepMotor(this->step_number % 4);
225+
} else {
226+
yield();
225227
}
226228
}
227229
}

0 commit comments

Comments
 (0)