grbl library for Processing.
This repo is especially focused on using plotters, laser cutter(not considering z-axis and linear power).
import processing.serial.*;
import grblP5.*;
GrblP5 plotter;
plotter = new GrblP5(this, GrblP5.list()[2], 115200);
/*GrblP5.list()[2]: port name
115200: baud rate*/
List devices to make sure what the port name is:
String[] list = plotter.list();
Unlock from the alarm state:
plotter.unlock();
Just go to the home position:
plotter.home();
Determine the home position with limit switch trigger:
plotter.homing();
Control pen up / down with servo motor:
plotter.servo(Boolean flag);
All drawing methods can be written like Processing.
Draw rectangle:
plotter.rect(float x, float y, float w, float h)
Draw circle:
plotter.circle(float x, float y, float r)
Draw line:
plotter.line(float x1, float y1, float x2, float y2)
Just go to position:
plotter.goTo(float x, float y)
More examples for geidai plotter workshop.
- xml inclusion in grblP5 Library






