Welcome! Log In Create A New Profile

Advanced

M42 in old Marlin 1.1.x

Posted by aatird 
M42 in old Marlin 1.1.x
February 14, 2024 02:17AM
Hi,

I'm working with a fairly old Marlin setup and want to use M42 to switch some pins.

In the Code documentation there is a line saying "Set the pin mode. Prior to Marlin 2.0.9.4 this is set with the M parameter." I've been trying to find some documentation on this, but unfortunately can't.

Does anyone know the correct usage of M42 and M-value in Marlin 1.1.x.

Many thanks,

Ingo
Re: M42 in old Marlin 1.1.x
February 14, 2024 02:46AM
Marlin 2.0.5.2 - 2.0.9.3 uses the M parameter to set the pin mode: 0=INPUT, 1=OUTPUT, 2=INPUT_PULLUP, 3=INPUT_PULLDOWN. In Marlin 2.0.9.4 and up the T parameter is used instead.
VDX
Re: M42 in old Marlin 1.1.x
February 14, 2024 03:21AM
... I'm remembering something like "M42 P2 S255" for activating a Pin D2 (and accordingly "... S0" to deactivate)


Viktor
--------
Aufruf zum Projekt "Müll-freie Meere" - [reprap.org] -- Deutsche Facebook-Gruppe - [www.facebook.com]

Call for the project "garbage-free seas" - [reprap.org]
Re: M42 in old Marlin 1.1.x
February 14, 2024 05:18AM
Great, thank you ... I'll give it a shot.
Sorry, only registered users may post in this forum.

Click here to login