Raspberry pi
Setup a fresh install of raspian on a raspberry pi. Enable ssh, vnc, etc. as usual.
Download cncjs.
Note this site appears to have the latest code and NOT the intuitively named https://cnc.js.org/.
Install cncjs
Follow the directions on https://www.npmjs.com/package/cncjs.
Setup cncjs to autostart
mkdir ~/.config/autostart
nano cncjs_autostart.desktop
and enter the following lines into the desktop file.
[Desktop Entry] Type=Application Name=cncjs_autostart Exec=sudo cncjs -p 80
This should allow the code to autostart. Note that sudo is required to use a non-default port (default = 8000). Note that 80 is the default html port (which I like because it makes connecting to cncjs easier).
TODO. complete this section.
Install grbl on your arduino (TODO add steps) inside of your raspberry pi.
Log into your pi with VNC and install arduino IDE.
Install the grbl library
Upload to the arduino
log into cncjs Open your browser, enter <ip address>, and cncjs should load. Make sure you can connect to grbl on your arduino.
Make sure basic functions work
If the spindle enable pins aren't working, comment out the line #define VARIABLE_SPINDLE inside Inside config.h. (inside the grbl library). Note that M3 or M4 is the gcode to enable the spindle and M5 disables the spindle. Apparently, there is a mixup in pins 11 and 12 somewhere for some shields or with the Uno.
Next, we start tweaking the grbl settings to work with cncjs.
**