Flash All Your GRBL Config Settings at Once.

Introduction: Flash All Your GRBL Config Settings at Once.

About: general bloke type of tinkering

Here's a quick way to flash all GRBL configuration settings to your Arduino (Mega or Uno) without having to enter them individually in a gcoder sender, ie $10=3 on the command line.

I had been playing around with many gcode senders and my "lets push this" habit got my Mega 2560 erased quite a few times, thus was born the need for a quick fix.

Im pretty sure the culprit was 3dpburner, I was struggling to get it to connect to the arduino and pushed everything in sight. :)

Step 1: Software Requirements.

You'll need some software to get things to work properly:

  • Python V2.7 (its an older version because the script was written in an older version and tosses out an error if you use python 3.)
  • Simple_stream.py this is the script which gets the job done.
  • grbl.gcode this file contains the settings that simple stream sends to the arduino.
  • Pyserial, a module called by simple stream.
  • Pytime, also a called module.

Pyserial is available here, https://pypi.org/project/pyserial/#history

Simple stream is available on Github here. https://github.com/grbl/grbl/blob/master/doc/scrip...

You can also copy the 66 lines of code there and paste it into a text file using Notepad, which you then rename to simple stream.py.

Pytime is here. https://pypi.org/project/pytime/#files

For convenience I've attached the script and its called modules as well as a default grbl.gcode which can be edited to your liking.

It contains the default settings from the GRBL wiki, so dont use them on your machine as is.

Step 2: Editing Simple Stream.py

The default script wont work on your PC unless you use the default port string "/dev/tty.usbmodem1811".

For my windows pc it needs some editing on the port search string to COM6, this must be done using a text editor like notepad++ to retain the code formatting.

At this point you can also change the baud rate if need be.

As per the screenshots I hadnt yet installed the needed modules.

Step 3: Installing the Modules.

As can be seen, I just extracted the files into the C:\Python27\Lib folder, although there are probably better ways to do it, but my pc didnt respond to "pip install".

Pytime was a simple root folder extract and for pyserial, I extracted the serial folder only, into the lib folder.

Step 4: Lets Try Again.

Now with all dependencies loaded we should have an error free run.

Both simple stream and grbl.gcode need to be in the same folder, which can be anywhere, mine are in D:\Temp in this example.

Also make sure your arduino is connected.

Step 5: One More Example.

Here Im using a gcode sender to interrogate my board.

Its also how you edit config settings the old way , one by one.

Meanwhile, back in the grbl.gcode file, I've changed the Z axis travel speed to 777, its easy to note and makes me feel like a winner. :)

After a script run with no errors, we open up gcoder sender again to interrogate the board.

Lo and behold $112 is now equal to 777.

Step 6: GRBL.code Content Format.

For what its worth, you can either use bare config strings or with all the comments added because GRBL ignores the bracket contents anyway.

Share

    Recommendations

    • Creative Misuse Contest

      Creative Misuse Contest
    • Tiny Home Contest

      Tiny Home Contest
    • Water Contest

      Water Contest

    5 Discussions

    0
    None
    svenhb

    5 weeks ago

    Nice work,

    but installing Python, just to save the GRBL Settings? Wow... (it feels like 1GB in 10 million files, taking 2 hours to copy) - sorry my impression.

    If you use windows, did you ever try GRBL-Plotter? You can save the GRBL Settings from the clipboard (after pressing "Check GRBL" in the COM window) to an text file, edit the file and send it back by drag and drop...

    https://github.com/svenhb/GRBL-Plotter

    3 replies

    Quite a lot of features, but I hadnt heard of it till your comment.

    I havent figured out where to change the drawing area max size, so it tries to go outside the area and hits the alarm.

    Clipboard01.jpg

    The yellow area shows the dimension of your code, which can be changed via Menu 'Code transform'

    Aah thanks.

    thought it might be but it was still too big at 80%.

    Very useful!