Reposting here (Sorry Peter :D). Successful Laser Fire of the K40 in vector mode.

Reposting here (Sorry Peter :D). Successful Laser Fire of the K40 in vector mode. It cuts great off of the SD card. However when cutting over USB the machine locks up or moves erratically. I think I have the serial buffer issue on my knockoff RAMPS setup. Any pointers on getting ramps compiles with the 128 byte ring buffer versus the 64? I couldn’t seem to get the code mode working (wound’t recognize the additional boards in the listing). Anyone have a good link that works with the latest IDE?

Other oddity - the laser doesn’t stop firing at the end of the GCODE. There is a G0 Z… which should stop it but because the Z might be disabled it might be better to send a laser of (M5) instead.

Found Franco’s Documentation:
"K40 laser rasterized images sends fast and large size commands over serial, so, the common 64 byte buffer in arduino isn’t enough.

You can edit “board.txt” in arduino ide, copy the “mega 2560” board declaration, call it “mega 2560 serial buffer 256” and then add a line like:

mega256.build.extra_flags=-DSERIAL_RX_BUFFER_SIZE=256 -DSERIAL_TX_BUFFER_SIZE=256
and then in the arduino ide select “mega 2560 serial buffer 256” board."

Will try this now :smiley:

@Michael_Audette ​ there is an issue with marlin/ramps buffer. I cannot find the issue number on the github repo but there is someone that increased thus providing better results

For certain. In fact I plan on documenting the whole mod process I followed from start to end. Really for an additional $40 over the cost of a stock K40 this is a cheap upgrade. Even if the USB doesn’t work maybe one of those WiFi USB cards will. Personally I’d rather jog the laser at the laser and be near the kill switch when I cut anyhow not in front of the computer.

The documentation on my repo is only for very recent versions of the arduino IDE.

In older version you need to modify HardwareSerial.h to enlarge the serial buffers

Thanks! I have the most recent IDE and the old method doesn’t work so your documentation should be perfect!

@Franco_nextime_Lanza - ist eher any way to determine if the defines take when compiled? With and without the defines the Program Storage Space and Global Variables use the same amount of storage/ Is there any way know with certainty either during the compile or through serial debug what the buffer size is set to?

sorry i’m not really an arduino IDE expert, but there should be somewhere a way to save a report or something like that with allocations when building

Anyway, just try it :slight_smile:

I have had issues like that before reducing the serial baud rate to 57600 helped a lot. Messing with the buffers didn’t