The Real Grbl 1.1f

A project log for GUI Programming for a Console Hacker

After 30 years of procedural language programming (i.e. console programming), time to look at event driven programming.

agpcooperagp.cooper 01/05/2019 at 14:080 Comments

Grbl 1.1f

Grbl has made some changes to the serial protocol. The "V" in front of version is gone and the speed is now 115200 baud.

So a minor rework. Introduced a bug that cost a lot of time to find.

Grbl has inhibited the reset on connection and prints a \r\n before the "Grbl " signature. You need to hit the reset  button to get Grbl to respond.

Line terminations are \r\n (Windows) rather than \n (Linux) but Grbl tolerates \n.

Still not working as I like, something for tomorrow.

Uploading Grbl to a spare Nano

First down load Grbl v1.1f from:

I renamed the file to shorten it, to "grbl_v1_1f.hex".

Although I have Arduino installed, I put it in /opt rather than among the system files.

So I installed avrdude using:

To upload Grbl, open a terminal where the "hex" file is and type:

Obviously, my serial port is /dev/ttyUSB0 (yours may be something else).

Strange Behaviour

I was having problems communicating with Grbl.

First problem with GUI programming is that different parts of the program can talk to the serial port. Make sure you are debugging the right place!

Second, the end of line termination "\r\n" (i.e. Windows) did not work, even though Grbl is a "\r\n" device. The code has to use "\n". The "System" must be changing this on the way out?!

Grbl uses a ^x as a soft-boot, I will have to add this to the initialisation code.


Okay, it's taking to Grbl and although the Nano is not hooked up to the Laser machine, it is working is way though the file at its own pace:


Note, the first "<< ", that was because there is a duplicate command, and the second "<< " was  a blank line at the end of the file. So all good.

Need to look at initiation codes to make sure my units match.

It Happens

It was working! The image above proves it, but this afternoon it stopped.

Any way I swapped out Serial code for the "Terminal" code as that was working.

Turned off the Command Dialog while the print is active (could be messy).