As Mark said, Marlin supports a number of menu items in it's advanced configuration. These items are ment to run custom Gcode, which in this case (adding a preheat action with custom target extruder and bed temp) is enough to fill your needs. Right now I'm at the office so I can't provide an example, but I'll be back tonight with some better explanation and a code snippet.
sup? I'm back, sry for the delay. So, let's see that advanced configuration file: Configuration_adv.h. The section we are looking for is almost at the end of the file, you can ctrl+f for "CUSTOM_USER_MENUS" to find it.
#define CUSTOM_USER_MENUS
#if ENABLED(CUSTOM_USER_MENUS)
#define USER_SCRIPT_DONE "M117 User Script Done"
#define USER_SCRIPT_AUDIBLE_FEEDBACK
//#define USER_SCRIPT_RETURN // Return to status screen after a script
#define USER_DESC_1 "Do the trick"
#define USER_GCODE_1 "G91\nG0 z5\nG0 y10"
#define USER_DESC_2 "Park"
#define USER_GCODE_2 "G27 P2"
//#define USER_DESC_2 "Preheat for PLA"
//#define USER_GCODE_2 "M140 S" STRINGIFY(PREHEAT_1_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_1_TEMP_HOTEND)
//#define USER_DESC_3 "Preheat for ABS"
//#define USER_GCODE_3 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nM104 S" STRINGIFY(PREHEAT_2_TEMP_HOTEND)
//#define USER_DESC_4 "Heat Bed/Home/Level"
//#define USER_GCODE_4 "M140 S" STRINGIFY(PREHEAT_2_TEMP_BED) "\nG28\nG29"
//#define USER_DESC_5 "Home & Info"
//#define USER_GCODE_5 "G28\nM503"
#endif
The source code downloaded from the official repo actually comes with some examples (the ones commented) and I added two more just for fun. To get your custom preheat menu item working you'll make use of the following Gcodes:
- M140: set target bed temperature (visit http://marlinfw.org/docs/gcode/M140.html for some more data)
- M104: set hot end target temperature (visit http://marlinfw.org/docs/gcode/M104.html for some more data)
That's all, see ya