The official tool for Maslow CNC; control your Maslow with any web browser.
- Browser-based, multi-platform controller software.
- Connects to Maslow’s Arduino Mega (or similar) via USB.
- Includes setup instructions (updated from Maslow Community Garden).
- Runs gcode (
.ncfiles) for printing cuts.
WebControl started as a browser-based port of the original GroundControl application, but has grown to support more features:
- The calibration and setup process is better documented and easier to use.
- It implements a flask+socketio web server, so other computers on the network may control the machine.
- It can be run on a low-cost device, like a Raspberry Pi.
- It can also support multiple custom firmwares developed by the community which enhance the Maslow.
At this point, WebControl has become the de-facto beginner’s tool for Maslow.
See the dedicated repository.
There are both single-file (installer) and single-directory (zipped) releases available. The installer files are appropriate for faster machines, like a Windows 10 laptop where an installer executable is desired. Zipped, “single-directory” releases will unpack faster and startup quicker on devices like the Raspberry Pi.
See the releases page and choose the appropriate architecture and release type.
To run WebControl automatically on startup for a Linux-based machine, it is recommended to create a service:
type the following:
[Unit]</br> Description=WebControl</br> After=network.target</br> </br> [Service]</br> ExecStart=/home/pi/webcontrol/webcontrol</br> WorkingDirectory=/home/pi/webcontrol</br> StandardOutput=inherit</br> StandardError=inherit</br> Restart=always</br> User=pi</br> </br> [Install]</br> WantedBy=multi-user.target</br>
Save file using Ctrl-X/Yes
sudo cp webcontrol.service /etc/systemd/system
Test with the following:
sudo systemctl start webcontrol.service
Try to reach webcontrol using your browser.
To debug, try:
sudo systemctl status webcontrol
Or, to. get logs:
When it works, then type:
sudo systemctl enable webcontrol.service
see for more details: https://www.raspberrypi.org/documentation/linux/usage/systemd.md
- Pull the docker image from
- Mount a data/config volume at
- Expose port
- Run with
privileged: truesecurity context for USB access.
WebControl can be run behind a front-proxy with TLS termination, such as nginx. You can use this in conjunction with semi-static IP to access your Maslow from anywhere with internet access. The full scope of this is outside this documentation, so you should be sure you understand the security implications before proceeding (hint: WebControl doesn’t have a login or user authentication system).
Open your web browser to
localhost:5000 (or use the IP address of your device).
- Flask - The web framework used
- Flask-Socketio - Websocket integration for communications with browser clients
- Bootstrap4 - Front-end component library
- Jinja2 - Template engine for web page generation
- Feather.js - Only icon library I could find that had diagonal arrows.. works well to boot.
- OpenCV - Library for computer vision to implement optical calibration
- Numpy - Library for math routines used with optical calibration
- Scipy - Another library for math routines used with optical calibration
- Imutils - Adrian Rosebrock’s library used with optical calibration
- Schedule - Library used to schedule checking connection with arduino
- Ground Control - Much of this was adapted from the Kivy-based Ground Control
You can use virtualenv to set up a local development environment for running the code without installing packages in the system Python installation.
# Create a virtual environment virtualenv -p python3 .venv # Activate the virtual environment source .venv/bin/activate # Install the prerequisites pip install -r requirements.txt
When running on the Pi, you’ll also need some extra dependencies and will need to build OpenCV from source. See the Dockerfile for details. (TODO: add instructions here)
Then you can run the code with.
The server will then be available at http://localhost:5000
This project uses black to automatically format python code. To run the autoformatter, simply install black locally with
pip install black
Subsequently, you can just run
black . to format all files in the current directory.
If you don’t have python3.6+ locally (to be able to run
black), you can run
black in a Docker container.
docker run -v $(pwd):/code johnboiles/python-black .
Pycharm Community Edition is a free, well-featured Python IDE.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
Added to TODO list?
- Madgrizzle - Initial work - madgrizzle
- John Boiles - Docker Expert - johnboiles
- Tinker - UI Improvements/Bug Fixer/Etc. - gb0101010101
See also the list of contributors who participated in this project.