I think this illustrates a basic problem common to some modern machine development. Too much dependency on complex software for simple functionality. The whole point of manual jog controls is to maintain basic functions and BYPASS anything complex that may have failed, is not yet set up, or has been misplaced. You donāt even need to supply the buttons. Just provide solder pads, holes, or headers where a user can connect his own.
4 gpio pins for
Lmot_Step, Lmot_Direction, Rmot_Step, Rmot_Direction INPUT
or
Lmot_In, Lmot_Out, Rmot_In, Rmot_Out INPUT
or
MoveLeft, MoveRight, MoveUp, MoveDown INPUT
or
Lmot_In_LED, Lmot_Out_LED, Rmot_In_LED, Rmot_Out_LED OUTPUT
2 more jumpers provide 4 bits to select between the above functions reusing the same pins.
2 gpio to read an encoder to select the number of encoder pulses per step.
E_Stop
HomeX, HomeY, HomeZ
BusyFlag to indicate that the last commanded move is still in process.
Serial, SPI, or I2C to read registers containing important variables and setup constants. This communications channel can duplicate all the above GPIO functions over 2 just wires.
Thats 13 GPIO and a communications channel. It provides everything for an operator to stand in front of the machine and operate it manually without any computer.
Edit: oops, forgot Z.
Zmot_Step, Zmot_Direction INPUT
Zmot_In, Zmot_Out INPUT
MoveIn, MoveOut INPUT
Zmot_In_LED, Zmot_Out_LED OUTPUT
Maybe reserve SledGPIO as well for vacuum on/off, pen up/down etc. So 16 GPIO total.
The exact same connection points also provide a basic interface that R Pi, ESP32, a network router, or really any computer can use to interface with the Maslow hardware with or without any version of ground control.
Another advantage of having duplicate control interfaces is that you can rapidly switch between them to compare the function of one against the other. This allows for rapid validation of code changes and ease of pinpointing differences between implementations.
Thats a lot more than just buttons, but I was on a roll and wanted to get it down before I forgot. Its been a while since I looked at existing Maslow firmware code or GRBL code, so lots of this might already be in there.