Skip to content
Scott Lahteine edited this page Mar 23, 2016 · 4 revisions

DO NOT EDIT THIS PAGE. The wiki is being ported to a new documentation system.
Please see Issue #3088 "New Documentation" for more information.

Table of Contents


Directly change a hardware pin's state. If no pin is specified, the LED pin is assumed.


 M42 P9 S1

Set the state of Pin 9 to 1.


 P<pin>   An optional pin number. If omitted use the LED pin.
 S<value> Required. The state value to set, 0-255.


M42 immediately changes a hardware pin's state. This can cause bad things to happen if not used correctly. Use with caution!

If you need the pin change to wait for the last-queued move, precede it with M400.

You can’t perform that action at this time.