With the new Grbl version (1.1d) I took the challenge to create a jog box. For the communication I used the solution described here: LCD_on_GRBL For hardware I selected the Sparkfun Joystick Shield so I had very little soldering to do.
For test I used another UNO, the previous Protoneer stepper shield and a stepper motor recovered from an old printer.
The repeat “button” is triggered with an interrupt every 50ms and the jog instruction is 0.3mm at F360.
The X and Y are controlled with the Joystick and can move simultaneously.
Yes, it is the 4066N as described in the LCD example. (link above)
At an interrupt it looks if a button is pressed or analog value is above a desired limit. Then I switch on the Tx line, wait 1ms, send serial out, wait another 1ms and give the line back to the USB. So for every 50ms only 5 are connected to the jog box. (Sending the jog command takes just over 2ms)
The button left of the Z jog buttons is a Feed-Hold and on the right Start-Resume.
With the new Jog commands the distance travelled matches the time so it stops almost immediately when button is released.
The code at the link doesn’t have any jogging instructions in it, does it? Did you modify that code to add it or write something from scratch? You don’t mention any jog cancel (0x85) commands, are they not necessary?
The article shows the technical implementation not the jog functions. I wrote my own sketch to do this. Disadvantage of this hacking into the communication between PC and Machine is that the PC does not know where the machine is and unable to use the soft limits properly.
Shortly after this project I decided that I needed to spend more time on my Airplanes and less on what became a rewarding but time consuming 2nd hobby. I swapped GRBL for EstlCAM which comes with a game controller support. So far very pleased with this change.