Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
on_boot.gcode [2020/02/10 12:11]
arthur
on_boot.gcode [2020/02/10 12:18] (current)
arthur
Line 1: Line 1:
-====== Using on_boot.gcode ​======+= Using on_boot.gcode =
  
 If you create a file on your SD card named <​kbd>​on_boot.gcode</​kbd>,​ the contents of that file will be executed every time the machine boots up. If you create a file on your SD card named <​kbd>​on_boot.gcode</​kbd>,​ the contents of that file will be executed every time the machine boots up.
Line 5: Line 5:
 This is useful if you need to set things up a certain way, or perform actions, every time the machine is reset. This is useful if you need to set things up a certain way, or perform actions, every time the machine is reset.
  
-kbd: <key>contents_of+that-file</​key>​+== Useful codes == 
 + 
 +Here are some useful G-codes you might want to use in your on_boot.gcode ​ 
 + 
 +<key>G28</​key>​ ( 3D printer mode ) or <​key>​$H</​key>​ ( CNC mode ), instructs the machine to seek the endstops on all axes, useful if you want your machine to always know where it is. Without this, features such as soft endstops will not work until the user manually issues a endstop seeking ( home ) command. 
 +* <​key>​G92</​key>​ To set what the current position is 
 +* <​key>​G0</​key>​ To move the head somewhere in the work area 
 +* <​key>​G91</​key>​ or <​key>​G90</​key>​ to set the current mode to absolute or relative 
 +* <​key>​G53 G0</​key>​ to move to a position in absolute machine coordinates instead of the current workspace coordinate system 
 +* <​key>​M105</​key>​ to set a given temperature on a heater so it starts pre-heating 
 +* <​key>​M106</​key> ​to turn a fan on at boot time 
 + 
 +See [[supported-g-codes]] for more information on these and other G-codes.
  
-key: <​key>​contents_of+that-file</​key>​