JohnnyFun / robowriter

App that sends drawing commands to axidraw machine to write beautiful letters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

	○ TODO:
		§ Major
			§ Stop printing disabled when done
			§ Pen up/down settings
				§ Higher jig so pen is stabler
				§ Up/down set in code
				§ Maybe a process to calibrate
					◊ Write same sentence over and over, slightly lowering the two settings with each one
						} Give user ability to set range high to low to try and step
							– Advanced settings gear area
			§ Go to zero prior to printing
				§ Look at code to determine how to reset to start position
		§ minor
			§ Link serial port from docker? 

Description

  • build up an svg version of the letter with an svg font
  • send that svg to axidraw cli to plot with axidraw machine via usb

Run the app

  • Docker (use "no docker" instructions since docker container currently can't connect to the axidraw machine--probably need to expose a serial port to the container)
    • docker-compose up
      • does everything that the "No Docker" section does inside the docker container upon starting up
      • open http://localhost:5006/
      • issues:
        • If using Docker "toolbox" for windows home addition, you're probably better off just running directly on the host machine. It's a pain to get everything working with the virtualbox instance that's used to get around not having hyper-v
  • No Docker
    • install dependencies
    • axidraw and hershey-advanced cli
      • note the axidraw cli doesn't appear to be packaged in npm or pip, so it's just copied directly to the source of this project and we build it here
      • cd ./axidraw_cli/AxiDraw_HTA_API_v254_r5
      • pip install .
    • npm i
    • npm start
  • Deployment
    • easiest would be to simply clone the repo on the machine that's connected to the axidraw via usb and make a shortcut to "start.sh" or "start.bat" on the homescreen
      • else, probably wouldn't be too tough to just wrap the app in an electron app and provide an installer and have it like a normal app on the computer

Using

  • axidraw machine
    • plugin machine to the wall so it has power
    • make sure pen is setup
    • connect machine(s) to computer via usb that is running this app
    • type into the letter input
    • click "print preview"
    • confirm preview looks correct
    • click "print"
    • machine should begin printing

Notes

  • Hershey-advanced defects settings currently are simply set to sane defaults in hershey-advanced.js. If you find you're changing them often, a UI could be built to pass those from client-side and save them to localstorage
  • Hershey-advanced allows specifying different fonts at the svg text element level, but robowriter currently only allows one font to be used. Sometimes acronyms look better in a different font, so if that comes up, we can add that functionality to robowriter. Workaround would be to download the inkscape svg from robowriter, open in inkscape and use hershey-advanced in there and then print from there.

TODO: Write tests

Tests

  • npm run test
    • take a look in ./tests folder

About

App that sends drawing commands to axidraw machine to write beautiful letters


Languages

Language:Python 90.4%Language:JavaScript 5.0%Language:HTML 4.0%Language:Shell 0.6%Language:Batchfile 0.0%