# Specific 3D Printers, Scanners, & Hardware > RepRap Format Printer Forum > Firmware Enhancements to Marlin >  Gcode in Firmware

## Fri

Could a gcode string be saved in the firmware like a G28 or so? I am working on a nozzle cleaning process and would like to not have to do it with a slicer.

----------


## Roxy

Yes.   I do not have an LCD Panel but the way they do their work is they 'inject' GCode commands into the printer's buffer.   Basically, they are pretending the printer got the command from PronterFace even though the LCD Panel generated it.    Check out one of the LCD Panel's .cpp code and you should be able to find what I'm talking about.  Specifically, search for enquecommand and enquecommands_P.   The _P version saves memory from being used in the RAM space.

----------


## Mjolinor

If you are talking about a set series of fixed movements on a menu button then bypass the Gcode part altogether and add it to Marlin directly. Marlin is well structured for adding bespoke code.

----------


## Roxy

> If you are talking about a set series of fixed movements on a menu button then bypass the Gcode part altogether and add it to Marlin directly. Marlin is well structured for adding bespoke code.


Yeah!  I agree!

----------


## Fri

Great thanks guys, I will try and sure post more questions here.

----------

