Welcome! Log In Create A New Profile

Advanced

Writing G-code

Posted by SH1510 
Writing G-code
March 07, 2017 11:26AM
Hello,
My current setup is an arduino mega and RAMPS 1.4 with Marlin, together running 3 stepper motors. I want to use G-codes to run the motors. Could someone kindly let me know where I can write the G-codes and if the Ramps supports them if written directly in the Marlin-arduino IDE??
Looking forward for an answer.
Thank you.

Edited 1 time(s). Last edit at 03/07/2017 11:26AM by SH1510.
Re: Writing G-code
March 07, 2017 12:29PM
Sure you can. A lot of the lcd menu options send Gcode to a serial port of the CPU. Same as Pronterface or any other printer host program does.
I'd open Marlin in ArduinoIDE and search for terms like G28, G1 etc... that will lead you to the right subroutines, where you can add/modify code to your hearts content.
Re: Writing G-code
March 08, 2017 01:28AM
Hey,
I don't seem to find any. Tried up to G40, no results.
Another doubt, If i write the Gcodes on a new window and upload them to arduino + ramps, will it work? Or should I write the code in Marlin.h file?
Re: Writing G-code
March 08, 2017 01:49PM
I made a screenshot how I found G28.
Attachments:
open | download - Marlin_main.cpp_G28.JPG (179.7 KB)
Sorry, only registered users may post in this forum.

Click here to login