M5 means “stop the spindle’s rotation”.
A spindle is a controlled motor that turns a tool (endmill) at a given speed to allow it to remove material from the workpiece.
M5’s evil twin is the M3 command which is used to start the spindle and specify its rotation speed.
The command is used as such:
M5
Which means: stop the spindle’s rotation.
No parameters.
The spindle functionality of Smoothie is configured via the Spindle module.
These resources are used as references for Gcode: