1

Topic: sending GCODE via c++

Hey all,
Im a new user to the solidoodle. I'm modifying my solidoodle to use it as more of an xyz plotter.

I configured a c++ script to generate a .gcode file with the line by line xyz instructions. I'm curious if anyone know how to easier send instructions to the solidoodle Arduino. possibly through the serial port or usb cable?

please let me know your thoughts and thanks so much !

happy printing !

2 (edited by adrian 2013-08-02 12:38:41)

Re: sending GCODE via c++

high-speed serial is all it is, and the g-code is just passed in plain text

You will need to connect however at 250,000bps 8-N-1...  and yes it needs 250000 bps to avoid issues with the buffer emptying and pausing prints... which may or may not be an issue for you as a plotter, but if you switch down to 115200 (and you'll need to recompile Marlin to make the change) it will end up pausing mid-print often.

3 (edited by Necromant 2013-08-02 13:38:59)

Re: sending GCODE via c++

Just go give a http://www.tldp.org/HOWTO/Serial-HOWTO.html and http://en.wikibooks.org/wiki/Serial_Programming/termios a good read
Basically all you have to do is fopen /dev/ttyUSB0 and doing read/write to the fd. Simple as that.
Also, take care that far not all usb2uart dongles properly support tcdrain, and it returns when there are a few bytes still in tx fifo that can screw things up. I know that pl2303 and ft232rl definitely had this problem.