It is just sending a g-code also here it is a server-command. But it could be any g-code marlin can understand.
On/off is a bit difficult as you must know what the current state is. Easiest is to use server-commands which set a global variable and a @func you could call when button is pressed. With parsing marlin responses you can set the variable when it contains a state change for that setting.
Comments
It is just sending a g-code also here it is a server-command. But it could be any g-code marlin can understand.
On/off is a bit difficult as you must know what the current state is. Easiest is to use server-commands which set a global variable and a @func you could call when button is pressed. With parsing marlin responses you can set the variable when it contains a state change for that setting.