<p>I'm trying to use one of the RAMPS GPIOs to control an external device that requires a 5V low-current logic level signal from Marlin. In order to do this programmatically, my host software (Octoprint) is sending an M42 command. I am using the following syntax:</p>

<pre><code>M42 P4 S255
</code></pre>

<p>according to the pinout in the following image:</p>

<p><a href="https://i.stack.imgur.com/TRInv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TRInv.png" alt="enter image description here"></a></p>

<p>However, the pin appears to not be driven to a logic HIGH level. Is there firmware-level configuration I need to do as well, or is my syntax/pin number incorrect?</p>

[{'answer_id': 4067, 'author': 'markshancock', 'author_id': 6417, 'author_profile': 'https://3dprinting.stackexchange.com/users/6417', 'pm_score': 3, 'selected': False, 'text': '<p>I looked at the current Marlin code and the P24 command should work as you expect it unless the pin you are trying to use in listed as the "SENSITIVE_PINS" list:</p>\n\n<pre><code>#define SENSITIVE_PINS { 0, 1, \\\nX_STEP_PIN, X_DIR_PIN, X_ENABLE_PIN, X_MIN_PIN, X_MAX_PIN, \\\nY_STEP_PIN, Y_DIR_PIN, Y_ENABLE_PIN, Y_MIN_PIN, Y_MAX_PIN, \\\nZ_STEP_PIN, Z_DIR_PIN, Z_ENABLE_PIN, Z_MIN_PIN, Z_MAX_PIN, Z_MIN_PROBE_PIN, \\\nPS_ON_PIN, HEATER_BED_PIN, FAN_PIN, FAN1_PIN, FAN2_PIN, CONTROLLER_FAN_PIN, \\\n_E0_PINS _E1_PINS _E2_PINS _E3_PINS _E4_PINS BED_PINS \\\n_H0_PINS _H1_PINS _H2_PINS _H3_PINS _H4_PINS \\\n_X2_PINS _Y2_PINS _Z2_PINS \\\nX_MS1_PIN, X_MS2_PIN, Y_MS1_PIN, Y_MS2_PIN, Z_MS1_PIN, Z_MS2_PIN \\\n}\n</code></pre>\n\n<p>These pins are printer specific; so, without access to your Marlin build, I can\'t see if pin 4 corresponds to one of these.  If this is the problem, the command should be returning an error.  If there is no error, I would look closely at the hardware.</p>\n'}, {'answer_id': 8110, 'author': 'Athul', 'author_id': 10670, 'author_profile': 'https://3dprinting.stackexchange.com/users/10670', 'pm_score': 0, 'selected': False, 'text': '<p>Might be because servo pins are not connected to 5V. use Jumper as shown</p>\n\n<p><a href="https://i.stack.imgur.com/ycegg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ycegg.png" alt="enter image description here"></a></p>\n'}]
['https://3dprinting.stackexchange.com/questions/3389', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/62/']