Gctrl: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
 
(11 intermediate revisions by the same user not shown)
Line 3: Line 3:
Gctrl is a GUI (Graphical User Interface) program for use with GRBL. Gctrl is code that is meant to run on the software called "Processing". Gctrl provides control options for jogging and sending gcode.
Gctrl is a GUI (Graphical User Interface) program for use with GRBL. Gctrl is code that is meant to run on the software called "Processing". Gctrl provides control options for jogging and sending gcode.


[https://github.com/damellis/gctrl Gctrl] '''You can get Gctrl by going to this link and downloading the zip file, then extracting its contents to a folder of your choosing'''
=Requirements=


'''You don't need to modify the Gctrl code for windows'''
[http://opensourceecology.org/wiki/Processing Processing]


=How to Get Gctrl on Linux=
=How to Get Gctrl=


*Open Terminal and type:
[https://github.com/damellis/gctrl Gctrl]


git clone https://github.com/damellis/gctrl.git gctrl
'''You can get Gctrl by going to the link and downloading the zip file (by clicking "ZIP"), then extracting its contents to a folder of your choosing'''


[[Image: gctrl.png]]
*'''Archived Gctrl File: [[File: gctrl.pde]]


=Modify Gctrl code for Easier Connection with Arduino on Linux=
=How to Run Gctrl=
 
*Navigate to the Processing folder
 
[[Image: ProcessingFolder.png]]
 
*'''Open Processing by double-clicking on the Processing executable.'''
 
[[Image: RunProcessing.png]]
 
*'''In Processing, go to File>Open, then navigate to the folder that contains gctrl.pde, then select that file. Processing should now open another window with the gctrl code.'''
 
[[Image: OpenGctrl.png]]
 
*In Processing, click "Run"
 
[[Image: RunGctrl.png]]
 
*Now the Gctrl GUI window should pop up
 
[[Image: GctrlGUI.png]]
 
*Note: For certain functions of gctrl, press and hold down the key for the popup windows to populate.
 
=Modify Gctrl code for Windows ports=


*Open the Gctrl folder
*Open the Gctrl folder


[[Image: gctrlfolder.png]]
*Edit the Gctrl code as follows:
 
*Open gctrl.pde in gedit


*Change a part of the code as annotated in the following:
// select and modify the appropriate line for your operating system


Serial port = null; //change starts
// leave as null to use interactive port (press 'p' in the program)


String portname = "/dev/ttyACM0"; // Linux, Arduino Uno
//String portname = null;


//change ends
//String portname = Serial.list()[0]; // Mac OS X


boolean streaming = false;
//String portname = "/dev/ttyUSB0"; // Linux


[[Image: gctrlnewcode.png]]
String portname = "COM6"; // Windows


=How to Run Gctrl=
=Modify Gctrl code for Linux ports=


*Navigate to the Processing folder
*Open the Gctrl folder


[[Image: ProcessingFolder.png]]
[[Image: gctrlfolder.png]]


*Open and run Processing, setting the sketchbook folder as the folder in which the gctrl folder exists
*Open gctrl.pde in gedit


[[Image: RunProcessing.png]]
*Change a part of the code as annotated in the following:


*In Processing, open gctrl using File>Sketchbook>
Serial port = null; //change starts


[[Image: OpenGctrl.png]]
String portname = "/dev/ttyACM0"; // Linux, Arduino Uno


*Connect the Arduino Uno to the computer via USB cable
//change ends


*In Processing, run gctrl using Sketch>Run
boolean streaming = false;


[[Image: RunGctrl.png]]
[[Image: gctrlnewcode.png]]


*Now the Gctrl GUI window should pop up
=Problems and Solutions=


[[Image: GctrlGUI.png]]
Problem: java.lang.NullPointerException


*Note: For certain functions of gctrl, press and hold down the key for the popup windows to populate.
Solution:

Latest revision as of 01:03, 13 November 2012

What is Gctrl

Gctrl is a GUI (Graphical User Interface) program for use with GRBL. Gctrl is code that is meant to run on the software called "Processing". Gctrl provides control options for jogging and sending gcode.

Requirements

Processing

How to Get Gctrl

Gctrl

You can get Gctrl by going to the link and downloading the zip file (by clicking "ZIP"), then extracting its contents to a folder of your choosing

How to Run Gctrl

  • Navigate to the Processing folder

ProcessingFolder.png

  • Open Processing by double-clicking on the Processing executable.

RunProcessing.png

  • In Processing, go to File>Open, then navigate to the folder that contains gctrl.pde, then select that file. Processing should now open another window with the gctrl code.

OpenGctrl.png

  • In Processing, click "Run"

RunGctrl.png

  • Now the Gctrl GUI window should pop up

GctrlGUI.png

  • Note: For certain functions of gctrl, press and hold down the key for the popup windows to populate.

Modify Gctrl code for Windows ports

  • Open the Gctrl folder
  • Edit the Gctrl code as follows:

// select and modify the appropriate line for your operating system

// leave as null to use interactive port (press 'p' in the program)

//String portname = null;

//String portname = Serial.list()[0]; // Mac OS X

//String portname = "/dev/ttyUSB0"; // Linux

String portname = "COM6"; // Windows

Modify Gctrl code for Linux ports

  • Open the Gctrl folder

Gctrlfolder.png

  • Open gctrl.pde in gedit
  • Change a part of the code as annotated in the following:

Serial port = null; //change starts

String portname = "/dev/ttyACM0"; // Linux, Arduino Uno

//change ends

boolean streaming = false;

Gctrlnewcode.png

Problems and Solutions

Problem: java.lang.NullPointerException

Solution: