Source code for X-carve Arduino sketch?

Just wondering where I can find the source code for the Arduino sketch that drives the X-carve? I’ve looked around the forums a lot and while I’ve found the design files for the machine, I haven’t found the source code sketch that gets uploaded to the Arduino.


Thanks for the link to the GRBL code repository Andy! But surely Inventables has customized that code for the specifics of the X-carve? And I don’t see anything X-carve-specific at the link you provided.

The Arduino is just running GRBL.

The source code for grbl 0.9j is available at this page. You upload it to the Arduino using Arduino IDE software. After that, you modify the parameter set for your specific machine. If using Easel, it sets those parameters when you do the machine setup.

1 Like

Not in my understanding. grbl just drives motors using gcode, which is a standard. There are a few codes that grbl doesn’t implement due to Arduino limitations, but it is just gcode at the end of the day.

Inventables help sponsor grbl development, so there might be some influence about feature priority, but that’s about all.

One of the things I did without thinking was to run some test code on the Arduino that shipped with my XCarve. Of course that removed the grbl install they shipped with it. I just flashed a new grbl and kept going; it never even occurred to me that I should get a specialized grbl from Inventables.

That was exactly the reason I posted my question @JamesMoore. If the code that ships with the X-carve has been customized in any way then I’d like to know where I can download that specific customized code. I think it would be good to have it backed up somewhere on my computer so that if something happens; if I somehow overwrite it by doing something like what you did; I’d like to be able to reload it with confidence that my X-carve will perform as it originally did.

Since I also anticipate that I may want to do a little experimentation with my X-carve - maybe add some hardware or features - which might require modifying the code, it’d be good to be able to easily restore the original code.

I didn’t buy my Arduino from Inventables, I already have some, so I’m just using the grbl that I downloaded.


Try this:

I had trouble with the hex file, but when I downloaded the source and re-compiled it worked fine.

1 Like

Thanks Larry! Just what I was looking for.

FWIW, I also found this link useful.

That leads to the grbl link I posted earlier. Grbl is grbl but you have to choose the correct configuration file before compiling and uploading.

1 Like

Just got back to looking for the code again and all I see is source for the X controller and none for the Arduino Uno and gshield that I own. Is that code somewhere else?

You can use the same grbl code for the Arduino and X-controller.

But don’t the hardware differences require different coding? Surely the pinouts and such are different between the two controllers? Or is the X controller driven by the same Arduino Uno?

The Arduino and the X-controller both use the ATmega328, which is the micro-controller. The X-controller was designed to be a replacement for the Arduino/gShield and uses a very similar functional design.

The design changes were better cooling and layout. (Possibly better controller chips but I do not have one to compare atm)
The pins are the same as Larry said.