4

I'm doing a project for college connecting an app made with app inventor to a Raspberry Pi and then using the RPi to make a printing queue for a Prusa P3 Steel.

The thing is that I already have the comm between the app and the RPi but I need to connect the RPi to the Arduino via USB and select the G-code files that are in the SD card of the Prusa to print. I don't know where should I put the function in the Marlin code or how to manage the serial port read function.

Any ideas?

Greenonline
  • 5,831
  • 7
  • 30
  • 60
  • why don't you connect the prusa via USB to the Rpi? That way you can feed the G-code directly and keep the queue on the Pi. – Hacky Dec 27 '17 at 13:30
  • Just out of interest: Are you using [MIT App Inventor](http://appinventor.mit.edu/explore/) for iOS or [App Inventor](http://www.appinventor.org/) for Android? – Greenonline Oct 09 '18 at 17:49

1 Answers1

4

You can send the G Codes to select and print a file over the serial connection.

  • List the files

    M20

  • Select a file name

    M23 filename.gco

  • Start/Resue the print

    M24

See https://reprap.org/wiki/G-code for more information M20 through M39 are the ones for interfacing with SD Card files.