Replies: 2 comments 1 reply
-
No, there is no such way and it would be a new feature. Definitely easier, than the callback for the enable pin, which is actually a callback at beginning and end of the movement. |
Beta Was this translation helpful? Give feedback.
-
I was looking for this as well, but came up with a suitable workaround (is a dev project, so may change), but basically I wrapped the stepper into a motor control class and run an ESP32 periodic timer, this checks the state of the library e.g.
for the MotorControl.cpp
In the other classes you want a call back from you can register the with the method you want to call on callback;
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. Many thanks for sharing this awesome project! As an amateur to hardware programming, I can't imagine how my projects can be done without your fantastic library.
My project involves controlling a slider to the desired place from a PC client. The Move() and MoveTo() functions are very helpful achieving this. However, currently the PC client does not know whether it is finished, unless querying the steppers in a loop. I am wondering if there is already a way to insert a callback function to the engine so that it will be executed to let the pc know the movement has finished. I know there is already a blocking option in the movement. My program invovles controlling multiple stepper motors so blocking is hard to deal with.
Beta Was this translation helpful? Give feedback.
All reactions