{"id":13994710,"url":"https://github.com/ithinkido/PiPlot","last_synced_at":"2025-07-22T20:30:49.104Z","repository":{"id":37554123,"uuid":"393200017","full_name":"ithinkido/PiPlot","owner":"ithinkido","description":"Add RS232 connectivity to your Pi  and connect to vintage plotters. With full hardware flow control, no extra adapters or cables needed.","archived":false,"fork":false,"pushed_at":"2025-04-20T22:40:41.000Z","size":233,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-20T23:28:29.496Z","etag":null,"topics":["hardware-flow-control","hpgl","hpgl-plotters","null-modem","raspberry-pi","vintage-plotters"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ithinkido.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-08-06T00:09:28.000Z","updated_at":"2025-04-20T22:40:44.000Z","dependencies_parsed_at":"2024-04-25T13:42:17.927Z","dependency_job_id":null,"html_url":"https://github.com/ithinkido/PiPlot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ithinkido/PiPlot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ithinkido%2FPiPlot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ithinkido%2FPiPlot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ithinkido%2FPiPlot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ithinkido%2FPiPlot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ithinkido","download_url":"https://codeload.github.com/ithinkido/PiPlot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ithinkido%2FPiPlot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266567136,"owners_count":23949295,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hardware-flow-control","hpgl","hpgl-plotters","null-modem","raspberry-pi","vintage-plotters"],"created_at":"2024-08-09T14:03:03.880Z","updated_at":"2025-07-22T20:30:49.086Z","avatar_url":"https://github.com/ithinkido.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ithinkido/PiPlot/main/images/logo.svg?sanitize=true\" width=100%\u003e\u003c/p\u003e\n\n# PiPlot\n***\nThe PiPlot is a hardware shield that adds RS232 connectivity with serial hardware flow control to your Pi. It was designed to eliminate the need for USB -\u003e Serial adapters and null modem cables when connecting to vintage plotters.\nThis page has useful info on setting up your Pi for use with the PiPlot shield. The shiled enables hardware flow control using the Pi GPIO serial port /dev/ttyAMA0. It has been tested on the Pi4, Pi3b+,Pi Zero W and Pi Zero 2 W running (Raspbian) PiOS Lite. I would highly recomend the Pi Zero 2 W for this project, as it makes for a fast and compact solution.\n\n## The quick and easy  way\nIf you are running the recomended (Raspbian) PiOS, this simple one liner will do all of the steps below:\n\n    curl -sSL https://raw.githubusercontent.com/ithinkido/PiPlot/main/install.piplot.sh | bash  \n\n## Step by step install\n\nDownload the `uart-ctsrts.dtbo` file into your `/boot/overlays` folder.\n\n     sudo wget -P /boot/overlays https://raw.githubusercontent.com/ithinkido/PiPlot/main/uart-ctsrts.dtbo\n\nAdd the following lines to your `/boot/config.txt` file:\n\n    #flow control serial\n    dtoverlay=disable-bt\n    enable_uart=1\n    dtoverlay=uart-ctsrts\n\nChange the read write permissions on the port\n\n    sudo chmod a+rw /dev/ttyAMA0\n    \nSet the baud rate and flow control\n\n    stty -F /dev/ttyAMA0 9600 crtscts\n\nYou can now send a file to your plotter using the `cat` command e.g.\n\n    cat PATH/TO/YOUR/FILE \u003e /dev/ttyAMA0\n\nSadly, the Pi is not good at remembering port config. These setting will be lost on reboot. In order to make them permanent,\n\nadd your user to tty groups,\n\n    sudo adduser $USER tty\n\nremove the line `console=serial0,115200` from your `/boot/cmdline.txt` file.\n\n    sudo nano /boot/cmdline.txt\n\nBy default the Raspberry Pi uses this serial port for the console login via the software service “getty”. This will override your settings on this serial port. To disable getty use this:  \n\n    sudo systemctl stop serial-getty@ttyAMA0.service\n    sudo systemctl disable serial-getty@ttyAMA0.service\n \n By adding the following to your cron tab, your Pi will automagically configure the AMA0 port with hardware flow control and the correct baud on boot: \n Open the crontab.  \n\n    crontab -e   \n\n Add this to the bottom:    \n\n    @reboot sudo stty -F /dev/ttyAMA0 9600 crtscts\n\n And reboot...\n You will now have a permanent hardware flow controll configured on port dev/ttyAMA0 with read write permissions for your user profile on start up.\n\n # Pen Plotter Web Server\n \n [@henrytriplette](https://github.com/henrytriplette/ \"@henryTriplette's Github home page\") has done a amazing job creating a plotter web server. This, in combo with the PiPlot, takes all the hard work out of pen plotters. A modified fork of this , adapted for the Pi Plot, can be found here:\n\nhttps://github.com/ithinkido/penplotter-webserver/tree/PiPlot  \n\n\n[\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ithinkido/penplotter-webserver/PiPlot/docs/img/Demo.gif?sanitize=true\" width=80%\u003e\u003c/p\u003e](https://github.com/ithinkido/penplotter-webserver/tree/PiPlot \"Pen-plotter web server screen shot\")  \n\n\n# Manually sending files to your plotter  \n\nIf you would like to manually send files to your plotter, the following notes will be useful.  \n\nAs the PiPlot shield handles full hardware flow conrol there is no need for using any form of software buffer control. You can simply use `cat`. eg.  \n    \n    cat myfile.hpgl \u003e /dev/ttyAMA0\n\nThe port should be configured on boot for the correct baud and flow control, if you have omitted adding this to the crontab, you should call`sudo stty -F /dev/ttyAMA0 9600 crtscts` before sending the file  \n    \n    sudo stty -F /dev/ttyAMA0 9600 crtscts\n    \n# `wget` (the easy way to plot stuff you found online)\n\nThe wget command opens up the way to easily getting files you found on-line and sending them directly to the plotter all in one quick move.   \neg. Lets say you found [this](https://github.com/ithinkido/PiPlot/blob/main/images/columbia_A4_VS15.hpgl \"HPGL file of the Colubia space shuttle\") nice 80's classic plot of the space shuttle already in HPGL format. Throw this through the Pi Plot and watch the magic. \n    \n    wget -O - https://raw.githubusercontent.com/ithinkido/PiPlot/main/images/columbia_A4_VS15.hpgl | cat \u003e /dev/ttyAMA0\n\nIf you found an svg file, then vpype makes it easy, (presuming you have [vpype](https://github.com/abey79/vpype \"vpype\") installed - you really should - it rocks !)  \n[\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/abey79/vpype/master/docs/images/banner.png?sanitize=true\" width= \"50%\"\u003e\u003c/p\u003e](https://github.com/abey79/vpype \"vpype\")\n    \n    wget -O - https://raw.githubusercontent.com/ithinkido/PiPlot/main/images/columbia_A4.svg | vpype read - layout --landscape a4  write -f hpgl -d hp7475a - | cat \u003e /dev/ttyAMA0\n\n[\u003cp align=\"center\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/ithinkido/PiPlot/main/images/columbia_A4.svg?sanitize=true\" width=80%\u003e\u003c/p\u003e](https://github.com/ithinkido/PiPlot/blob/main/images/columbia_A4.svg \"Columbia space shuttle\")\n\n# Netcat and streaming  \n\nNetcat can be used \"stream\" the files to your plotter wirelessly. To do this, first configure your Pi to listen on the port of your choice ( here 1234 ) using baud rate 9600 with hardware flow control enabled.\n    \n     sudo stty -F /dev/ttyAMA0 9600 crtscts\n     nc -l -k 1234 \u003e /dev/ttyAMA0\n\nSending data can be done from the terminal program of your choice by openning up a telnet session to the Pi on the port you chose earlier ( 1234 in this case).  \n\nAlternatively you can set up Netcat on your local machine and send your file using this command: \n\n    nc PI-IP-ADRESS 1234 \u003c yourfile.hpgl\n\nBy adding this all as a boot entry to your cron tab, you have a wireless \"plotter server\" all setup and waiting after boot.\n\n    sudo crontab -e\n\nadd\n    \n    @reboot stty -F /dev/ttyUSB0 9600 crtscts \u0026\u0026 nc -l -k 1234 \u003e /dev/ttyUSB0\n\n# Buttons for custom functions  \n\nThe PiPlot has two buttons that are connectend through de-bouncing ciruits to GPIO 22 and GPIO 27 on the Raspberry Pi.\nThese can be used to trigger custom functions that the user creates.  \n\nA basic example could be \n    \n    @import RPi.GPIO as GPIO\n\n    GPIO.setmode(GPIO.BCM)\n    GPIO.setup(27, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)\n    GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)\n    \n    def start_button(channel):\n        print 'Start button pressed!'\n\n    def stop_button(channel):\n        print'Stop button pressed!'\n\n    GPIO.add_event_detect(27, GPIO.RISING, callback=start_button, bouncetime=100)\n    GPIO.add_event_detect(22, GPIO.RISING, callback=stop_button, bouncetime=100)\n\n\n## Foot Notes\n\n* The Pi does not remember port configuration very well. It is good practice to call `sudo stty -F /dev/ttyAMA0 9600 crtscts` to reconfigure the port for hardware flow control before each plot( adjust baud to match your machine).\n* The Pi shares the serial port with bluetooth. This is why it is necessary to disbale BT by adding the `dtoverlay=disable-bt` to your `/boot/config.txt`.\n* On board LEDs are for buffer state (red) and TX data (green). When you plug in the PiPlot and power up the plotter the red buffer LED will turn **off**. This is a hardware a pre-check. It shows that the PiPlot and plotter are talking nicely to each other. In this case, on powering up, the plotter has said \"I have space in the buffer\", to which the PiPlot replies, \"OK, I will turn off the buffer full LED then\". The red LED is not a power indicator LED.\n* Netcat relies on a constant connection to stream the files during the plot. You will not be able to complete the plot if this connection is broken. Under normal use this is not an issue, but it does mean that you will not be able to continue plotting if you shut down your laptop/PC during the plot while streaming over Netcat.\n\n\u003cbr\u003e\u003cbr\u003e\n\n![visitors](https://vbr.nathanchung.dev/badge?page_id=ithinkido.PiPlot)  \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fithinkido%2FPiPlot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fithinkido%2FPiPlot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fithinkido%2FPiPlot/lists"}