The current plan is to move all of the sensor detection into an external MCU, and the host, whether FluidNC or Marlin will get information via serial. A custom non-gcode serial connection could be done but I think sending gcode commands (and adding gcode commands where necessary) can accomplish almost everything that can be done with a custom serial, provided there is a facility for queue-jumping immediate processing.
My analog joystick for Marlin could be implemented through g-code if there were a way to:
- Perform relative move without switching between G91 (relative) and G90 (absolute) state and switching back. (Grbl has this with jog commands)
- Query queue depth to control latency by adjusting the rate of issuing commands
That’s basically it for the joystick but for the pendant I’m wanting a lot more functionality.
Buttons and handwheel are pretty self-explanatory as far as what they should do.
I also want instant feedrate adjustment. The use-case for going slow and for going fast are somewhat different, so I was thinking two knobs. One for going slow (0 to 100%) and the other for going fast (1x to maybe 5x). The slow knob would double as pause function, and by turning the knob within maybe 0.5 seconds you can stop and start without losing steps from excessive acceleration. Or if things are going poorly you can reduce the feed rate. The go-fast knob is if you turn out to have chosen a conservative feed rate and you want to see how fast you can go before the router starts making unhappy sounds. You can turn it up and then back off a bit. The slow (0 to 100%) and fast (1x to 5x) knobs are multiplied together so you can still pause and resume if you are going in overdrive.
These are straightforward enough to turn into (new) gcode commands, but the receiving end might be a challenge.