thinkyhead

M42 - Set Pin State

control Set an analog or digital pin to a specified state.

Description

For custom hardware not officially supported in Marlin, you can often just connect up an unused pin and use M42 to control it.

Usage

M42 [P < int >] S < int >

Parameters

[P < int >]

A digital pin number (even for analog pins) to write to. (LED_PIN if omitted)

S < int >

The state to set. PWM-able pins may be set from 0-255.