GRBL with internal stored G-Code on mega 2560

Discussion about the arduino based g-code interpreter, grbl
Post Reply
martin0608
Posts: 1
Joined: Wed Dec 17, 2014 6:23 pm

GRBL with internal stored G-Code on mega 2560

Post by martin0608 » Wed Dec 17, 2014 6:56 pm

Hello,

at first I want to say that I'am pretty new with working on arduino.
For a student project I want to control 3 stepper motors with my arduino mega 2560. In addition, there will be some easy controls before and after running the g-code like a sequence control system.
I will have three short g-codes. They should be stored on the internal storage and selected by pressing Button 1, Button 2 or Button 3. So there is no need of a Computer.
I have already made the system executable (flashing grbl on the arduino and send the g-code by a g-code sender).

Is there any way to store the g-code on the internal storage an execute it by pressing a button?
Unfortunately I couldn't find a way to make it run.

Many thanks for your answers in advance.

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: GRBL with internal stored G-Code on mega 2560

Post by chamnit » Wed Dec 17, 2014 9:40 pm

You'll need to program a way to load the g-code from memory and then feed it to grbl's main loop. That's in protocol.c. There isn't a direct way to do it as of now, since it's not designed for what you have in mind.

tbfleming
Posts: 89
Joined: Sat May 31, 2014 12:04 pm

Re: GRBL with internal stored G-Code on mega 2560

Post by tbfleming » Wed Dec 17, 2014 10:34 pm

A quick-and-dirty approach would be to use a second Arduino; it would monitor the buttons and send g-code over a serial connection to GRBL.

Post Reply