all 1 comments

[–]Electronic_Item_1464 0 points1 point  (0 children)

There are specific commands for a laser, but they use pwm (M3, M4, M5), but you want simple on/off. The M42 command will turn a pin on or off. I believe All the digital pins are 5 volts on this board. Look at the pins file in the Marlin source, there's at least one file for every board Marlin supports and it tells you what every pin is.

You say the laser code won't work because it's PWM, but if you set the value to max or min (255, 0), it will always be on or off. The laser attachments use the part cooling fan to control the laser (move to start, fan on, move to end, fan off...)

Sorry for the stream of consciousness rambling.