I used long wires and have my laser driver over with the Ramps board.
Here’s the link from Jtech on hooking it up to a Ramps:
For the short answer: hook it up to D9.
I think the piclaser programs are all based on GRBL, so I’m not 100% sure it will work. For Ramps, we’re using M106/M107 to turn an unused “fan” on and off. In their GRBL based configurations, they have it set to the PWM control for a normal spindle (M05 I think?) so I don’t think it would turn on and properly change the laser intensity.
Another user here linked to the Amazon pieces to put together a second Arduino with a GRBL based CNC controller…I think the whole thing could be done around $50-75.
He’s also tested a little of the GRBL for Ramps github release for the Arduino. I had trouble trying to compile/upload it so I gave up for a while. May try it again.