I am still trying to make my Laserbot work in a reasonable way. Having tried a number of open-source gcode interfaces that all got stuck on the originial firmware, I decided to do an upgrade to a current codebase. I rolled back to the closest Firmware revision I could find and looked at the differences and moved them to a clone of the Marlin master branch by adding a new board definition for the MegaPi.
The pin definitions for the MegaPi board are in pins_MB_LaserBot.h - the first two axes work, I copied the pin definitions for the other ones from the schematics, so you might need to check if they work ok.
Marlin has a relevant pull-request for spindle control that I have integrated and modified slightly for laser control, you can find the original discussion here:
You can find my code on github as well, under
Have a look at the SPINDLE_* constants in Configuration_adv.h to control timing - esp. the laser diode power-up delay needs some more tweaking. N.B. that the delays are in milliseconds, not in seconds as in the original PR.
Furthermore, you can find a branch ( ‘flipped_axes’) where I changed the X and Y axes to have the coordinate origin in the lower left corner, both axes with positive coordinates, the setup looks like this:
I did not try this with MLaser yet, but it should work as I added support for the ‘P’ argument in the M4 command as well.
Simon