grbl

testing grbl on an Arduino

links

grbl, grbl wiki, connecting grbl,

GRBL forks for the mega2560

gnea/grbl-Mega (official), connecting Grbl Mega, fra589/grbl-Mega-5X, grbl Mega 5X pinout, Quick Guide to Setting Up Your Machine for the First Time,

controller programs

bCNC, Candle, SourceRabbit GCode Sender, UGS - Universal G-Code Sender,

back to CNC page.

History

2021-08-30: I re-created this page on my self-hosted web server.

2018-11-03: grbl-Mega - ugs (platform, 2.0 beta from July 28, 2017) appears to work.

2018-11-03: grbl-Mega - I made changes in config.h for RAMPS 1.4: commented

//   #define DEFAULTS_GENERIC
//   #define CPU_MAP_2560_INITIAL

and uncommented

#define DEFAULTS_RAMPS_BOARD
#define CPU_MAP_2560_RAMPS_BOARD

recompile, an re-upload.

2018-11-03: grbl-Mega - I cloned the Grbl-Mega repository, deleted the old grbl library from ~/Arduino183/libraries/ and added the new one to the Arduino IDE (Arduino 1.8.5). Connected the Mega2560 to an usb port, it shows up as

[tingo@localhost ~]$ ll /dev/tty[ACU]*
crw-rw----+ 1 root dialout 166, 0 Nov  3 21:36 /dev/ttyACM0

and lsusb says

[tingo@localhost ~]$ lsusb -d 2341:0042
Bus 001 Device 006: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)

ok. Next, I open the Examples->Grbl, GrblUpload sketch. I verify that the board an dport is correct, then I compile and upload the sketch, it works. To test it, I open Serial Monitor, change the speed to 115200, and get this:

Grbl 1.1g ['$' for help]

good. I send '$'

[HLP:$$ $# $G $I $N $x=val $Nx=line $J=line $SLP $C $X $H ~ ! ? ctrl-x]
ok

good..

2018-11-03: grbl - both the official grbl-Mega and the grbl-Mega-5X supposedly supports RAMPS 1.4.

2017-07-11: Arduino IDE - cleaned out libraries:

[tingo@kg-elitebook ~]$ ls -la ~/Arduino/libraries/
total 12
drwxrwxr-x. 2 tingo tingo 4096 Jul 11 18:13 .
drwxrwxr-x. 3 tingo tingo 4096 Jul 11 15:50 ..
-rw-rw-r--. 1 tingo tingo   87 Jul 11 15:50 readme.txt

removed settings:

[tingo@kg-elitebook ~]$ ls -la ~/.arduino15/
total 8
drwxrwxr-x.  2 tingo tingo 4096 Jul 11 18:18 .
drwx------. 30 tingo tingo 4096 Jul 11 17:09 ..

copied grbl folder back to libraries

[tingo@kg-elitebook ~]$ ls -la ~/Arduino/libraries/
total 16
drwxrwxr-x. 3 tingo tingo 4096 Jul 11 18:19 .
drwxrwxr-x. 3 tingo tingo 4096 Jul 11 15:50 ..
drwxr-xr-x. 3 tingo tingo 4096 Jul 11 18:19 grbl
-rw-rw-r--. 1 tingo tingo   87 Jul 11 15:50 readme.txt

and started Arduino IDE again. Tried to compile the grblUpload sketch again, and got the error messages again.

2017-07-11: Arduino IDE - opened issue #228 on grbl for the error messages.

2017-07-11: Arduino IDE - then I just opened the grblUpload skecth in Arduino IDE and uploaded that. I got some error messages:

In file included from /home/tingo/Arduino/libraries/grbl/grbl.h:43:0,
                 from /home/tingo/work/bitraf/2017/20170710_grbl/grbl/grbl-1.1e.20170114/grbl/examples/grblUpload/grblUpload.ino:27:
/home/tingo/Arduino/libraries/grbl/nuts_bolts.h:25:0: warning: "false" redefined
 #define false 0
 ^
In file included from /zs/tingo/progs_lin/arduino-1.8.3/hardware/arduino/avr/cores/arduino/Arduino.h:24:0,
                 from sketch/grblUpload.ino.cpp:1:
/zs/tingo/progs_lin/arduino-1.8.3/hardware/tools/avr/lib/gcc/avr/4.9.2/include/stdbool.h:42:0: note: this is the location of the previous definition
 #define false false
 ^
In file included from /home/tingo/Arduino/libraries/grbl/grbl.h:43:0,
                 from /home/tingo/work/bitraf/2017/20170710_grbl/grbl/grbl-1.1e.20170114/grbl/examples/grblUpload/grblUpload.ino:27:
/home/tingo/Arduino/libraries/grbl/nuts_bolts.h:26:0: warning: "true" redefined
 #define true 1
 ^
In file included from /zs/tingo/progs_lin/arduino-1.8.3/hardware/arduino/avr/cores/arduino/Arduino.h:24:0,
                 from sketch/grblUpload.ino.cpp:1:
/zs/tingo/progs_lin/arduino-1.8.3/hardware/tools/avr/lib/gcc/avr/4.9.2/include/stdbool.h:43:0: note: this is the location of the previous definition
 #define true true
 ^
In file included from /home/tingo/Arduino/libraries/grbl/grbl.h:43:0,
                 from /home/tingo/work/bitraf/2017/20170710_grbl/grbl/grbl-1.1e.20170114/grbl/examples/grblUpload/grblUpload.ino:27:
/home/tingo/Arduino/libraries/grbl/nuts_bolts.h:56:0: warning: "max" redefined
 #define max(a,b) (((a) > (b)) ? (a) : (b))
 ^
In file included from sketch/grblUpload.ino.cpp:1:0:
/zs/tingo/progs_lin/arduino-1.8.3/hardware/arduino/avr/cores/arduino/Arduino.h:93:0: note: this is the location of the previous definition
 #define max(a,b) ((a)>(b)?(a):(b))
 ^
In file included from /home/tingo/Arduino/libraries/grbl/grbl.h:43:0,
                 from /home/tingo/work/bitraf/2017/20170710_grbl/grbl/grbl-1.1e.20170114/grbl/examples/grblUpload/grblUpload.ino:27:
/home/tingo/Arduino/libraries/grbl/nuts_bolts.h:57:0: warning: "min" redefined
 #define min(a,b) (((a) < (b)) ? (a) : (b))
 ^
In file included from sketch/grblUpload.ino.cpp:1:0:
/zs/tingo/progs_lin/arduino-1.8.3/hardware/arduino/avr/cores/arduino/Arduino.h:92:0: note: this is the location of the previous definition
 #define min(a,b) ((a)<(b)?(a):(b))
 ^
In file included from /home/tingo/Arduino/libraries/grbl/grbl.h:43:0,
                 from /home/tingo/work/bitraf/2017/20170710_grbl/grbl/grbl-1.1e.20170114/grbl/examples/grblUpload/grblUpload.ino:27:
/home/tingo/Arduino/libraries/grbl/nuts_bolts.h:61:0: warning: "bit" redefined
 #define bit(n) (1 << n)
 ^
In file included from sketch/grblUpload.ino.cpp:1:0:
/zs/tingo/progs_lin/arduino-1.8.3/hardware/arduino/avr/cores/arduino/Arduino.h:123:0: note: this is the location of the previous definition
 #define bit(b) (1UL << (b))
 ^
Sketch uses 30320 bytes (93%) of program storage space. Maximum is 32256 bytes.
Global variables use 1631 bytes (79%) of dynamic memory, leaving 417 bytes for local variables. Maximum is 2048 bytes.
Low memory available, stability problems may occur.

but it worked. grbl 1.1e is now installed. Seral Monitor, speed to 115200: command '$I':

[VER:1.1e.20170114:]
[OPT:V]
ok

nice.

2017-07-11: Arduino IDE 1.8.3 won't install grbl as a library, neither with "add .zip" or with "Manage libraries". So I just copied the 'grbl' folder from Arduino 1.1e zip file to ~/Arduino/libraries and restarted the IDE, Now grbls shows up as "unknown version" in manage libraries.

2017-07-11: connected the Uno R3, it shows up as /dev/ttyACM0. Tested with Arduino IDE and the blink example - works fine.

2017-07-11: I created this page.

2017-07-10: from Kjell.com in Torggata, I bought 1 x Kjell Academy Uno Rev. 3 (art. 88860) for NOK 100.- (ok, 99.90). I had usb A - usb B cables at home.