Requirements for initiating a print on a 3D printer via USB

552 Views Asked by At

I thought it would be fun to implement a rudimentary version of Octoprint that can receive a gcode file and initiate a print on my Prusa i3.

What are the requirements for initiating a print on a 3D printer via USB?

2

There are 2 best solutions below

0
On

You can use the pySerial library in Python to send raw G-Code to the /dev/ttyWhereverYourPrinterIs serial device. Most printers specify their baud rate in their UI, or user's manual. My printer says its USB baud rate is 115200.

0
On

Quoting Gina Häußge:

If you are only targeting a very specific printer with a very specific firmware variant: serial connection and then read up on https://reprap.org/wiki/G-code. It becomes a horrible nightmare to implement and maintain though when you take the thousands of firmware variants out there into account, so beware.