Wireless CNC and Laser Controller with CNCjs
Send G-code to a GRBL CNC router or laser engraver from any browser and watch the job on a webcam.
CNCjs is a web interface for GRBL, Smoothieware and other controllers. Running it on a Pi next to the machine frees your laptop from dust and vibration.
Lasers can blind instantly and start fires. Wear wavelength-rated laser goggles, use an enclosure with ventilation and keep a fire extinguisher nearby.
Mission steps
Install Node.js and CNCjs
Install a current Node.js LTS, then install CNCjs globally with npm.
Connect the machine
Plug the GRBL controller into USB and select its port and baud rate (usually 115200) in CNCjs.
Add a webcam
Enable the webcam widget to watch the job remotely.
Run as a service
Use pm2 or systemd so CNCjs starts with the Pi.
Stay in the room
Use the remote view for convenience, but never leave a running laser or spindle unattended.
Code
# with Node.js LTS installed
sudo npm install -g cncjs --unsafe-perm
cncjs --port 8000 --host 0.0.0.0
# open http://<pi-ip>:8000Tip: test every script on the bench before installing it in a moving machine.
Questions
Does it work with LightBurn?
LightBurn runs on your computer and talks to the laser directly. Use CNCjs instead when you want browser-based, wireless control.