Plotter
All the needed software to print images, text or gcode files on a plotter (a pen that moves along two xy axes)
Install / Use
/learn @Stypox/PlotterREADME
Plotter software
This repository contains all of the code needed to run a plotter and have it print G-code, text or images. In particular:
- the
plotter/subdirectory contains the Arduino sketch - the
gcode_parser.pyscript is able to read G-code, normalize it (so that the printed composition fits on a 2D rectangle of a specified size) and convert it to a shorter binary file - the
sender.pyscript takes the binary file generated bygcode_parser.pyand sends it to a plotter connected to the computer via a serial port - the
print.pyscript wraps all of the things you may need into a single command - text-to-gcode is used to convert some ASCII text to G-code
- image-to-gcode is used to convert an image to G-code, also with automatic edge detection

Usage
You can run any script normally with Python 3. E.g. for print.py:
python3 print.py ARGUMENTS...
This is the help screen with all valid arguments for print.py (obtainable with python3 print.py --help):
usage: print.py [-h] [-o FILE] [-b FILE] [-l FILE] [--end-home] [-s XxY] [-d FACTOR] [--simulate] [--port PORT] [--baud RATE] {binary,gcode,text} ...
Print something with the connected plotter
optional arguments:
-h, --help show this help message and exit
subcommands:
Format subcommands
{binary,gcode,text}
binary Send binary files directly to the plotter
gcode Print gcode with the plotter
text Print text with the plotter
Output options:
-o FILE, --output FILE
File in which to save the generated gcode (will be ignored if using binary subcommand)
-b FILE, --binary-output FILE
File in which to save the binary data ready to be fed to the plotter
-l FILE, --log FILE File in which to save logs, comments and warnings
Gcode generation options:
--end-home Add a trailing instruction to move to (0,0) instead of just taking the pen up
-s XxY, --size XxY The size of the print area in millimeters (e.g. 192.7x210.3)
-d FACTOR, --dilation FACTOR
Dilation factor to apply (useful to convert mm to steps)
Plotter connectivity options:
--simulate Simulate sending data to the plotter without really opening a connection. Useful with logging enabled to debug the commands sent.
--port PORT, --serial-port PORT
The serial port the plotter is connected to (required unless there is --simulate)
--baud RATE, --baud-rate RATE
The baud rate to use for the connection with the plotter. It has to be equal to the plotter baud rate. (required unless there is --simulate)
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
