GcodeCommunications: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
Line 13: Line 13:


[[RaspberryPi]] is a very small, low-cost, single-board open-source computer. Although Universal G-code Sender is distributed as a self-contained "One-jar" package that handles its own dependencies, it needs a little help on the arm-linux platform. I believe it misidentifies arm-linux as intel-linux and tries to use an x86 communications driver. Therefore we need to provide our own version of the communications library and manually unpack Universal G-code Sender.
[[RaspberryPi]] is a very small, low-cost, single-board open-source computer. Although Universal G-code Sender is distributed as a self-contained "One-jar" package that handles its own dependencies, it needs a little help on the arm-linux platform. I believe it misidentifies arm-linux as intel-linux and tries to use an x86 communications driver. Therefore we need to provide our own version of the communications library and manually unpack Universal G-code Sender.
These instructions were developed on a Raspbian Wheezy installation downloaded from [http://www.raspberrypi.org/downloads]. Here is the OS identification:
<pre>
pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux
</pre>


Install java and comms driver prerequisites
Install java and comms driver prerequisites

Revision as of 22:31, 23 December 2012

G-code Communications Programs

Gctrl

Gctrl(cross-platform)

Gcodesender

gcodesender(Windows).

Universal G-code Sender

Universal G-Code Sender.

Universal G-code Sender on Raspberry Pi

RaspberryPi is a very small, low-cost, single-board open-source computer. Although Universal G-code Sender is distributed as a self-contained "One-jar" package that handles its own dependencies, it needs a little help on the arm-linux platform. I believe it misidentifies arm-linux as intel-linux and tries to use an x86 communications driver. Therefore we need to provide our own version of the communications library and manually unpack Universal G-code Sender.

These instructions were developed on a Raspbian Wheezy installation downloaded from [1]. Here is the OS identification:

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux

Install java and comms driver prerequisites

sudo apt-get install openjdk-7-jre
sudo apt-get install librxtx-java

Note I installed openjdk-7-jdk, but I don't think it's necessary; the jre should be adequate.

download UniversalGcodeSender-v1.0.5-all32.zip from https://github.com/winder/Universal-G-Code-Sender/tree/master/releases

unzip UniversalGcodeSender-v1.0.5-all32.zip
jar -xf UniversalGcodeSender-all32.jar
cd lib
jar -xf swing-layout-1.0.4.jar
cd ../main
export CLASSPATH=$CLASSPATH:.:/usr/share/java/RXTXcomm.jar:../lib
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jni

To make the Arduino comm port visible, you need a command-line parameter

java -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0:/dev/ttyUSB0:/dev/ttyAMA0 com.willwinder.universalgcodesender.MainWindow

Be patient, it takes about 20 seconds to start the application.

UniversalGcodeSender.png

In action:

GCodeOnRPi.png

For minimum-cost implementation of CNC, it would be nice if the g-code sender interface could run from the composite TV-out of the Raspberry Pi (assuming an old TV may be cheaper than an HDMI/DVI monitor). Unfortunately, however, the UI doesn't fit:

GCodeSender tvres.png

Other

Other options for gcode streaming here.