Hi, a question about ramps 1.4 I use arduino mega + ramps 1.4 +

Hi, a question about ramps 1.4
I use arduino mega + ramps 1.4 + Marlin firmware combination for all my projects. In my last project : a laser engraver, I need control a little laser (300MA) with D8 terminal (Hoy bed). The question is : I can connect 12V to one Input (mark as “5A”) ,for motors drivers , and 5V to the other input (mark as “11A”)? (My laser need 5 volts). And how I can control de D8 output, what Gcode can I use to send PWM signal to D8 pin.? Thanks a lot. Regards.

You can program marlin to use any pin you want with the source code.
I don’t know about the pins or if you can connect 5v,you will need to read the schematics. If you are reusing the hot bed mosfet you might have trouble, marlin looks for a thermistor and uses pwm. It might be better to find an unused gpio and add your own mosfet.

@Stephanie_A ​ Thanks. The idea it’s use the available hardware in my Ramps.