M42 Command Issues - LED Lighting  

New Member

I have had some issues testing the G Code to implement LED lighting in all my prints, I have been trying to use Pronterface to test the M42 commands to pins to see that they work, but all pins I have used (even ones that others have used in tutorials, see https://blog.prusaprinters.org/how-to-create-beautiful-3d-print-timelapse-videos/ ) nothing happens. I have been trying to use the J19 Pin #7 as per the tutorial I linked (Digital Pin P73) but nothing happens. I have the following feedback from Pronterface after waiting 10 minutes for the command to perform:


Printer is now online.
echo: 3.7.2-2363
echo: Last Updated: Jun 27 2019 17:35:17 | Author: (none, default config)
Compiled: Jun 27 2019
echo: Free Memory: 2021 PlannerBufferBytes: 1392
echo:Hardcoded Default Settings Loaded
CrashDetect ENABLED!
echo:SD card ok
echo:busy: processing
echo:Unknown command: "105"(2)
MMU not responding - DISABLED
>>>M42 P73 s255
SENDING:M42 P73 s255

Pronterface does respond to my axis movements when I click to move them back and forth, so the printer is receiving commands from my PC.

Before you ask, I have tested the MOSFETs I set up along with the LED strips installed on my enclosure multiple time, and it all works. Even using the original remote that came with the LEDs works. Touching each color control pin to the 12V + ends on my LED power supply causes the LEDs to light up, so clearly the printer either isnt sending the signal to the LEDs, or isnt getting the command from Pronterface. I dont know which is which, but all pins I have tried (J19 pins 5, 7, 12, 11 and 8) but nothing does the trick. I also flashed the firmware again to the most recent (3.7.2 as of now) and that didnt change anything.

Any idea why this isn't working? Any help would be greatly appreciated!

Posted : 03/08/2019 1:33 am
New Member

Try measure  with some voltmeter directly on pin. Signal is on 3,3V  level - is it enough for your MOSFET type to open it enough to drive full required current of LED strip? You should look at the I-V curves specified for the MOSFET in catalog.

Posted : 11/09/2019 10:14 pm
Estimable Member

Is M42 supported in the prusa firmware ?  Not all commands are.  

Posted : 12/09/2019 8:57 am
Noble Member

There is code in the firmware but I think something is missing somewhere. I also attempted some experiments but the only item that would change state was using M42 without any pin arguments, that toggles an LED on the einsy. 


Posted : 12/09/2019 2:12 pm

Please Login or Register