Ganged motors with one direction pin
How to set up two motors per axis if their drivers are using one direction pin?
x:
motor0:
stepstick:
direction_pin: gpio.26
step_pin: gpio.12
motor1:
stepstick:
direction_pin: gpio.26
step_pin: gpio.22
[MSG:ERR: Configuration error at /machine/axes/x/motor1/stepstick: ERR: Setting up pin [gpio.26] failed. Details: Pin is already used.]␊
We did not consider that method in the design. Are you expecting the axis to auto square?
You could try changing the second one to NO_PIN and see what happens.
Here's what happened:
[MSG:ERR: Validation error at /axes/x/motor1/stepstick: Direction pin must be configured.]␊
[MSG:INFO: Configuration is invalid]␊
I wanted to configure it as in the previous version of Grbl_Esp32: https://github.com/bdring/Grbl_Esp32/wiki/Motor-Ganging-and-Axis-Squaring
We don't support motors without a direction pin right now. It would probably be possible, but I think we would have to limit it to the second motor only.
You could submit a feature request. The primary devs have a lot of other priorities, so it might be months before someone worked on it.
As a workaround, if you have a spare GPIO pin that is not already used for some other purpose, you could assign it as the second direction pin, but not connect it to anything.
As a workaround, if you have a spare GPIO pin that is not already used for some other purpose, you could assign it as the second direction pin, but not connect it to anything.
It works. Thanks!
I found another problem. In this version, as it turned out, the connection of double limit switches is also impossible. I mean this:

When specifying the same limit_all_pin for motor0 and motor1, an error pops up: "Pin is already used".
If you have switches connected to only one GPIO, just list that GPIO under motor0 and do not list anything under motor1
If you have switches connected to only one GPIO, just list that GPIO under motor0 and do not list anything under motor1
I tried this. Homing on the second motor does not work. I had to connect each limit switch separately...
We do not support auto squaring with one switch. We chose to use the stress free method where the axis does not need to be pulled out of square during homing.
This requires Fluid to use independent switches.