-
Notifications
You must be signed in to change notification settings - Fork 32
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
New feature: calibrating between two points (home and max position) #6
Comments
Hi Firstly thank you for the work you are doin got this software. We are using it at an Aviation museum to drive a model of a Link Trainer. |
Hi Frank, You could call Arduinos digitalRead(...) function to check which limit switch is triggered after booting. Then you need to set the direction of the initial move accordingly to move in the opposite direction. You might also have a look at the example https://github.com/examples/Example4_Limit_and_latching_EmergencySwitch/Example4_Limit_and_latching_EmergencySwitch.ino |
Hi Paul,
Thanks for the quick response and excellent solution.
Frank
… On 7 Apr 2024, at 6:08 PM, Paul ***@***.***> wrote:
Hi Frank,
You could call Arduinos digitalRead(...) function to check which limit switch is triggered after booting. Then you need to set the direction of the initial move accordingly to move in the opposite direction.
—
Reply to this email directly, view it on GitHub <#6 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ACTMFCKZC74IJ5WTBEB6TO3Y4DPHJAVCNFSM4VUVOLEKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBUGEZTEOBWGI2A>.
You are receiving this because you commented.
|
I am trying to calibrate between two points, so limit switches on both sides. This means I will first be calibrating on the home position (which you do have a function for), and then move to the other side, until the limit switch hits, and setting that as
MAX_STEPS
, so it cannot move any further than that point.That means if you try to do an absolute or relative-move, and that comes above MAX_STEPS, it will just stop at
MAX_STEPS
.You can now use the limit switch feature to get around this nonexistent feature, but the following functions could be implemented:
void startHomeAndLimitCalibration(int beginLimitSwitch, int EndLimitSwitch)
(maybe an extra callback function for when this is finished)
int getMaxSteps()
void setMaxSteps(int maxSteps)
void moveToMaxSteps()
bool isHomeAndLimitCalibrated()
There could be something I am forgetting, but I think this gets you a good idea of what I mean
The text was updated successfully, but these errors were encountered: