The Axidraw can be manipulated and controlled through Processing.
This is a brief look at how this can be implemented, download and unzip the files to continue.
If this is your first time using an Axidraw, I recommend checking out this tutorial first.
This program has a few features in it to start you off. Once you’ve plugged in the Axidraw, open and run the program with Processing.
Its important to note that this program assumes that you are drawing on an A3 size surface
|SPACEBAR||Raises and Lowers the Axidraw Head|
|ENTER||Moves the Axidraw head to the current mouse position|
|LEFT MOUSE||Adds a new Waypoint|
|p||The Axidraw will begin to draw between all waypoints|
|SHIFT + P||Clears all waypoints|
|t||Toggles the Axidraw to begin following the mouse. This function is not reliable due to how this program and the Axidraw communicate|
Here is a blank template for you to start with the Axidraw in Processing.
This program is as bare bones as possible, the only controls are the ENTER and SPACEBAR ones as above. This program Assumes an A3 workspace.
The “Axidraw_Control” file is where most, if not all, of your code should go. This is where your setup() and draw() functions are located.
The “Controller” and “Helpers” files encompass all of the predefined functions for connecting your computer to the Axidraw, and define the main functions you will be using to control it.
All of the functions you can use with the Axidraw can be found in the “Controller” file/the “Control” class
Main functions you should need to use are:
|up(), down()||Raises and Lowers the Axidraw Head|
|move(X, Y)||Moves the Axidraw head in the X and Y directions, relative to the current head position.|
|moveTo(X, Y)||Moves the Axidraw head to the desired coordinates on the page. (relative to 0,0)|
|motorSpeed(X)||Set the speed at which the Axidraw moves. This is constrained between 100 and 5000, and is set as 3500 by default. (you probably don’t want to go much higher than this anyway)|
|servoDelay(raise, lower)||Sets a delay value before raising and lowering.|
|servo(down, up)||Sets the pen-up and pen-down height for the servo. This is constrained between 1 (the servo’s absolute lowest point) and 65535 (the servo’s absolute highest point)|
You can use these functions within your own functions, or just string them together.
- These files all assume that you are planning to use an A3 workspace.
- Reset the position of the Axidraw each time you restart your program. This can be done by disabling the motors in Inkscape, or turning off the power at the wall, then pushing the Axidraw as far back and left as possible
- When using X and Y values relative to the mouse position (for example), you’ll need to multiply it by the ratio value (eg. mouseX*ratio) when plugging that value into the move() or moveTo() command.