I am building a focus controller for a telescope.
I have the T500 and 1204 stepper motor.
I am able to get it to work perfectly fine in the control center so no issues there.
I would like to use autohotkey to move the motor forward 1/8 turn when I use a keystroke and to go backward 1/8 turn when I use a different one.
I tried this, but can’t get it to work:
run ticcmd --exit-safe-start #to clear the safe start error
run ticcmd --position 200
run ticcmd --set-position 0
Please let me know if you have a short code that will do this.
We have some AutoHotkey scripts in this guide here, but those scripts are for other Pololu products, not for the Tic. Still they should give you a good idea on how to make your script work for the Tic.
--set-position 0 is not a valid argument with ticcmd. You can use
--position-relative and combine that with
--exit-safe-start so that it’s a single command (
ticcmd --exit-safe-start --position-relative 200). I suggest running the ticcmd commands in a command terminal (e.g. Windows Command Prompt) to verify the behavior before figuring out how to get it working in AutoHotkey.