This project is work-in-progress!
Axidraw-Web allow artists to connect AxiDraw in the browser with the WebUSB API. Or connect to remote AxiDraw with WebSocket proxy. You may also enjoy plotting on a virutal AxiDraw in the browser if you don't have a physical one.
Checkout more on the project board.
- EBB Communication via WebUSB
- EBB Communication via WebSocket
- EBB Command Debugger
- EBB Virtual Plotter
- SVG load and preview
- SVG path parser
- SVG elements to line segments
- Motion Planning (simple)
- Motion Planning (reorder)
- Plotting (constant speed)
- Plotting (acceleration mode)
- Plotting control (pause/resume/stop)
- Plot skipping/seeking
- A singing pen plotter, it's real.
- Run a virtual AxiDraw in the browser
- Generate motor sounds as the pen moving
- Free-mode Position control
- Color control
- Size control
The latest version is deployed at https://axidraw.mutoo.im , you don't need to install any software or plugins to use it. Just open the website and plug the AxiDraw on your machine to plot any svg with it.
Try the Debugger if you want to play with low-level ebb command.
Try the Composer if you wondering how the pen plotter singing.
Make sure you have node v20+
and pnpm
installed. Then checkout the repo and run pnpm i
to install all the dependencies.
$ pnpm dev
Sometime you want to use the AxiDraw connected to a raspberry pi or NAS, you can run the server on the remote machine and connect to it via WebSocket.
You will need to build the project first, and then run the server with a self-signed cert:
$ pnpm build
$ bash ./scripts/create-cert.sh
$ pnpm run server
In order to use WebUSB on the browser, you'll need to make it in a secure contexts. The localhost is considered a secure context, but the LAN address is not. So if you want to run it via LAN, you have to generate a self-signed cert on your own:
$ bash ./scripts/create-cert.sh
This command will generate a CA.pem
and localhost.crt
in the server/cert
folder.
Please import the CA.pem
to your system or browser and trust it for Secure Sockets Layer (SSL).
The local server will use the localhost.crt
and localhost.key
to host the website at:
https://localhost:8443
The cert generation script will also provide extra DNS including your hostname, and a wildcard dns address with your LAN ip (in case you don't have mDNS service in your OS):
# e.g. your hostname is raspberry-pi.local
# and your LAN ip is 192.168.3.14
https://raspberry-pi.local:8443
https://192.168.3.14.nip.io:8433
N.B. The certificate can be download at from browser.
htps://<Device-IP>:8443/ca
This very handy when you run the web server on Raspberry PI or other computer and access it at your work device.
To run production build locally, run the pnpm build
to build the and, and then pnpm preview
to start the web server:
$ pnpm build
$ pnpm preview
Then visit the app in your browser with links listed in the section above.
Feel free to run dev build if you like to inspect how the app work with devTools:
$ pnpm dev
it will run a dev server at https://localhost:5173
, which will popup automatically in your browser.
What if you plug in the axidraw on a Raspberry PI? No problem! This app also provide a proxy mode via WebSocket, so that you can run a web server to communicate the axidraw and your browsers in different computers.
N.B. The serialport/usb permission has to be set up so that the server can communicate with the device.
MIT
Thanks Evil Mad Scientist for providing such a great machine to play with.
This project is initially inspired by saxi. That I want to build a Web App like this without install a node project locally.