Contributor: Deanna Gelosi
Generate a scribble drawing on your phone and see a robot draw it live! Each drawing produces a receipt documenting how it was created. SquiggleDraw uses an AxiDraw and thermal receipt printer controlled from your phone with a web app. Click the web app to get started (invite key required).
Languages: Python3, HTML/CSS, Javascript, QML
Libraries: Adafruit Thermal Printer library, p5.js, AxiDraw Python API library, PyQt
Development Environments: VS Code, Figma, TablePlus
Reference: Squiggle Generator Processing (Java) project
Fig.1 - A workflow of SquiggleDraw, starting with 1) the mobile UI, 2) the AxiDraw CNC plotter, 3) the final drawing, and 4) the receipt documenting squiggle parameters.
SquiggleDraw is an AWS Amplify app that creates generative scribble drawings based on three parameters:
- Line length
- Turn radius: ranges between 1/4
$\pi$ and$\pi$ - Compression: the space between points that make up a line
The app connects to a AWS Dynamo DB which stores the parameters and other user defined values (title and author) and sends it to a queue. The queue reads from a Postgres database hosted on a Raspberry Pi which also controls the AxiDraw, thermal printer, and LCD control interface.
Once a job is chosen, the AxiDraw recreates the scribble on paper and a thermal printer creates a receipt documenting the user selected parameters.
Visit the mobile web app to load SquiggleDraw (invite key required).
On the Raspberry Pi, initiate the AWS connection.
python3 rasp_pi/connect_AWS.py
Then, run the following command to start the touchscreen UI on the Raspberry Pi.
python3 rasp_pi/lcd_controller.py
If needed, use Tailscale to SSH over a VPN.
# Check tailscale is running
sudo tailscale up
# Find te tailscale ip address:
tailscale ip -4
Connect the AxiDraw to the Raspberry Pi using USB.
Connect the thermal printer to the Raspberry Pi using a serial connection.
Fig.2 - The system diagram for SquiggleDraw containing both the AWS and Raspberry Pi setup.