Adding a laser- Issues with Marlin changes (RAMPS)

As Jeff indicates, you need to make the changes, compile the source, then upload it to your Ramps board. pins_RAMPS.h is the place to change the pin assignment. There are other changes you may want to consider. V1 enabled in-line laser support for two platforms they could test, SKR Pro and Rambo. They did not enable it for other versions including Ramps. I often find the easiest way to figure out what to change is to do a “diff” between the configuration.h and configuration_adv.h files in two versions. A free tools to compare two files is Meld. The following laser-related lines are clipped from a Meld output comparing configuration_adv.h files:

The lines in blue are the lines that are different between the two versions with Ramps on the left and Rambo on the right. I’ve clipped these lines with some context. They are not together like this in the file. You want to change the Ramps version to be like the Rambo version.

And I second Jeff’s approach:

  1. Get the firmware to compile and upload unchanged
  2. Make the pin change and upload. Verify with a multimeter that pin 44 can be changed using an M42 g-code.
  3. Make the changes in configuration_adv.h, and test with a laser. First test using the screen. You can find a test file with inline commands in the first post in this topic.