Some code to create and send lines to a pen plotters using grbl. Note that everything here is a first draft and needs more structure and stavility.
The produced gcode commands are meant to work with my eleksdraw pen plotter. To use this with other plotters the code may need some adjustments.
connect directly from terminal:
npx serialport-term -p /dev/tty.wchusbserial1440 -b 115200 --echo