{"id":13650863,"url":"https://github.com/nornagon/saxi","last_synced_at":"2025-04-13T02:16:42.828Z","repository":{"id":37622951,"uuid":"100773700","full_name":"nornagon/saxi","owner":"nornagon","description":"Tools \u0026 library for driving the AxiDraw pen plotter","archived":false,"fork":false,"pushed_at":"2025-02-20T10:59:20.000Z","size":2417,"stargazers_count":483,"open_issues_count":42,"forks_count":59,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-13T02:16:38.008Z","etag":null,"topics":["axidraw","plotter","serial"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nornagon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2017-08-19T05:58:45.000Z","updated_at":"2025-03-21T02:54:29.000Z","dependencies_parsed_at":"2023-02-05T01:46:41.487Z","dependency_job_id":"e5eb028d-cfb2-45dc-afd5-7a56f888e165","html_url":"https://github.com/nornagon/saxi","commit_stats":{"total_commits":294,"total_committers":14,"mean_commits":21.0,"dds":"0.22448979591836737","last_synced_commit":"31f59ac8cf087e4c157b65be398fd210fa81615b"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nornagon%2Fsaxi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nornagon%2Fsaxi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nornagon%2Fsaxi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nornagon%2Fsaxi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nornagon","download_url":"https://codeload.github.com/nornagon/saxi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654104,"owners_count":21140237,"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","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":["axidraw","plotter","serial"],"created_at":"2024-08-02T02:00:41.768Z","updated_at":"2025-04-13T02:16:42.802Z","avatar_url":"https://github.com/nornagon.png","language":"TypeScript","funding_links":[],"categories":["Software"],"sub_categories":["Plotter Control"],"readme":"# saxi\n##### make plot good\n\n### ARCHIVED\n!! NOTE !! Development has moved to https://github.com/alexrudd2/saxi\n\nsaxi is a tool for interacting with the [AxiDraw\ndrawing machine](https://axidraw.com/) by Evil Mad Scientist. It comes with an\neasy-to-use interface, and is exactingly precise.\n\n- automatically scales \u0026 centers your drawing to fit on the paper\n- minimizes pen-up travel time by reordering \u0026 reversing paths\n- uses a custom motion planning algorithm (inspired by [axi](https://github.com/fogleman/axi)) that's smooth \u0026 fast\n- automatically splits apart layers based on SVG stroke colors or group IDs\n- has a web-based UI, so there's no need to muck around with installing X11 and Inkscape\n- can run on a Raspberry Pi or similar, so you don't need to be tethered to your plotter while it plots\n\n![a screenshot of the saxi user interface](docs/saxi.png)\n\n### Usage\n\n```\n$ npm i -g saxi\n$ saxi\nServer listening on http://0.0.0.0:9080\nConnecting to EBB on /dev/tty.usbmodem1461\n```\nIf you encounter an `EACCES` error when installing the package globally, see [Resolving EACCES permissions errors when installing packages globally](https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally).\n\n#### Raspberry Pi\nTo install saxi on a Raspberry Pi, first install node.js if you haven't already:\n\n```\n$ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -\n$ sudo apt-get install -y nodejs\n```\n\nand then proceed as above :) If you connect to the raspberry pi over ssh, you might want to run the `saxi` server inside a tmux or screen session to have it stay running even if your ssh session disconnects.\n\nIf you want `saxi` to run at boot on the Pi you can use a systemd unit file and enable the service:\n\n```bash\nsudo tee /lib/systemd/system/saxi.service \u003c\u003cEOF\n[Unit]\nDescription=Saxi\nAfter=network.target\n\n[Service]\nExecStart=saxi\nRestart=always\nUser=pi\n\n[Install]\nWantedBy=multi-user.target\nEOF\nsudo systemctl enable saxi.service\n```\n\nTo watch the logs while it is running, use:\n```bash\njournalctl -f -u saxi\n```\n\n#### Raspberry Pi Zero OTG\n\n![Pi Zero on an AxiDraw with a Y-shaped USB cable](docs/pi-zero.jpg)\n\nFor the Pi Zero you can make a USB \"OTG\" cable out of two Micro-B cables and two 0.1\" headers\nto tap into the AxiDraw's 5V servo supply to power the Pi.  This makes for a more compact\ninstallation without the need for an additional wall-wart.\n\n\n```\n           +------ Center pin on servo rail\n           | +---- Ground pin on servo rail\n           | |\n           | |\nRed   -----+-|---- Red\nBlack -------+---- Black\nWhite ------------ White\nGreen ------------ Green (sometimes Blue)\n```\n\nThe Pi will also need to have the `dr_mode=host` parameter set in\n`config.txt` to force host mode, since normal USB Micro cables do not\ninclude the `ID` pin that would be used to signal that it is an OTG\nconnection.\n\n```\necho dtoverly=dwc2,dr_mode=host | sudo tee -a /boot/config.txt\n```\n\n\n#### CORS\nIf you want to connect to saxi from a web page that isn't served by saxi\nitself, you'll need to enable\n[CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS), otherwise\nGET/POST requests will be denied by the browser. CORS is disabled by default as\na security precaution, but if you need it it's available. Just launch saxi with\nthe `--enable-cors` flag.\n\n### Info\n\nsaxi makes use of the low-level `LM` command introduced in EBB firmware version\n2.5.3 to carry out highly accurate constant-acceleration motion plans. If your\nAxiDraw is running an older version of the firmware, saxi will fall back to the\nless-accurate (but still pretty accurate) `XM` command.\n\nTo check what version of the EBB firmware your AxiDraw is running, run `saxi --firmware-version`:\n\n```\n$ saxi --firmware-version\nEBBv13_and_above EB Firmware Version 2.5.3\n```\n\nTo upgrade your AxiDraw's firmware, see [here](https://github.com/evil-mad/EggBot/tree/master/EBB_firmware).\n\n### Developing\n\nTo work on saxi, you can clone this repo and then run `npm start`:\n\n```sh\n$ git clone https://github.com/nornagon/saxi\n$ cd saxi\n$ npm run dev\n```\n\nThis will watch local files for changes. If you change the server code, you'll need to restart manually.\n\n### Credits\nsaxi's motion planning algorithm is heavily inspired by Michael Fogleman's\n[axi](https://github.com/fogleman/axi) project.\n\nsaxi's UI would be an ugly mess if it weren't for [@kylestetz](https://github.com/kylestetz)'s discerning eye.\n\nThanks to [Evil Mad Scientist](http://www.evilmadscientist.com/) for designing\nand building such a lovely machine!\n\n---\n\n## Made with saxi\n\nThese images were plotted by folks using saxi. If you'd like to add something you've made here, [shoot me an email](mailto:nornagon@nornagon.net)!\n\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd width=300\u003e\n        \u003ca href=\"https://www.instagram.com/p/B9hFx9KFOwG/\"\u003e\u003cimg width=\"272\" src=\"https://user-images.githubusercontent.com/172800/80814353-9760ce00-8b80-11ea-8a94-64e13c33a7bc.jpg\" alt=\"Plotted image by @targz\" /\u003e\u003c/a\u003e\n        \u003cp\u003eby \u003cstrong\u003eJulien Terraz (\u003ca href=\"https://www.instagram.com/targz/\"\u003e@targz\u003c/a\u003e)\u003c/strong\u003e\u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd width=300\u003e\n        \u003ca href=\"https://github.com/abey79/vpype-explorations\"\u003e\u003cimg width=\"272\" src=\"https://user-images.githubusercontent.com/172800/80814313-81530d80-8b80-11ea-963a-9ea337f2c6a2.jpg\" alt=\"Plotted image by @abey79\" /\u003e\u003c/a\u003e\n        \u003cp\u003eby \u003cstrong\u003eAntoine Beyeler (\u003ca href=\"https://twitter.com/abey79\"\u003e@abey79\u003c/a\u003e)\u003c/strong\u003e\u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd width=300\u003e\n        \u003ca href=\"https://twitter.com/MAKIO135/status/1253334618243125256\"\u003e\u003cimg width=\"272\" src=\"https://user-images.githubusercontent.com/172800/80814775-4ef5e000-8b81-11ea-896c-e7522d4c38d1.jpg\" alt=\"Plotted image by @MAKIO135\" /\u003e\u003c/a\u003e\n        \u003cp\u003eby \u003cstrong\u003eLionel Radisson (\u003ca href=\"https://twitter.com/MAKIO135\"\u003e@MAKIO135\u003c/a\u003e)\u003c/strong\u003e\u003c/p\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd width=300\u003e\n        \u003ca href=\"https://www.instagram.com/p/B4iixy7gDB9/\"\u003e\u003cimg width=\"272\" src=\"https://user-images.githubusercontent.com/172800/80815693-faebfb00-8b82-11ea-81a3-24f825b405ce.jpg\" alt=\"Plotted image by @daniel_feles\" /\u003e\u003c/a\u003e\n        \u003cp\u003eby \u003cstrong\u003eDaniel Feles (\u003ca href=\"https://www.instagram.com/daniel_feles/\"\u003e@daniel_feles\u003c/a\u003e)\u003c/strong\u003e\u003c/p\u003e\n      \u003c/td\u003e\n      \u003ctd width=300\u003e\n      \u003c/td\u003e\n      \u003ctd width=300\u003e\n      \u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnornagon%2Fsaxi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnornagon%2Fsaxi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnornagon%2Fsaxi/lists"}