A library for allowing devices implementing the XY2-100 protocol to be able to parse G-Code in order to control them in real time.
- Initialize dependencies
XY2_100 *galvo = new XY2_100(...);
Laser *laser new Laser(...);
SerialGCodeParser *parser = new SerialGCodeParser(115200, galvo, laser);- Make the parser listen continuously in the
loop()method
void loop() {
parser->listen();
}That's all. Just connect to the serial port and feed it G codes. It will echo all commands by default.