Step 8: Processing
The program only requires 4 pieces of information (5 if using an accelerometer) before you can start drawing: the time it takes your robot to do a complete 360 degree turn, the speed of your robot (cm/s), the window height, and the window width. If using an accelerometer the 360 turn time is not needed, but rather the max and minimum values for your accelerometer are specified. These are all crucial to having an accurate drawing. In the program just click on the buttons (such as window height or robot speed) to change the values. A left click increases the values and a right click decreases a values. Once you have completed the setup click the "Done" Button. A small scale version of your window will appear.
Before drawing be sure to click on the "Homepoint" button and drag it onto the mock window. Wherever you release it a small red circle will appear, this is the place that your robot must be placed to start the drawing, and it will return to that spot at the end of the drawing.
Now to start drawing simply click and drag in the scale version of the window. Where you first click the mouse will be the start point of the line and where you release will be the end point of the line. There is also an "Undo" button in case of mistakes! Wherever you see a white line is where the robot will lower the pen and draw, between those lines it lifts the pen and moves to the start of the next drawn line.
Once you have completed the drawing simply click the "Generate Code" button. In the bottom of the original processing sketch (the one with the code in it), a bunch of arduino commands will appear (Should say things like angleLeft(); or drive();). Scroll up to where the commands start and use ctrl - c / v to copy them all. This will be used with the arduino in the next step. (If using the accelerometer program the first command will be calibrate(values here); as this gives the robot your max and min accelerometer readings.
All the Arduino and Processing sketchs can be downloaded HERE