You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Install PM2
sudo npm install -g pm2
# Setup PM2 Startup Script
# sudo pm2 startup # To Start PM2 as root
pm2 startup # To start PM2 as pi / current user
#[PM2] You have to run this command as root. Execute the following command:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
# Start CNCjs (on port 8000, /w Tinyweb mount point) with PM2
## pm2 start ~/.cncjs/cncjs-pendant-raspi-gpio/bin/cncjs-pendant-raspi-gpio -- --port /dev/ttyUSB0
pm2 start $(which cncjs-pendant-raspi-gpio) -- --port /dev/ttyUSB0
# Set current running apps to startup
pm2 save
# Get list of PM2 processes
pm2 list
Button Presses
G-Code: M9
G-Code: M8
G-Code: M7
G-Code: $X "Unlock"
G-Code: $X "Unlock"
G-Code: $SLP "Sleep"
G-Code: $SLP "Sleep"
G-Code: $H "Home"
Press & Hold
3 Sec: sudo poweroff "Shutdown"
Wiring
See the fivdi/onoff Raspberry Pi GPIO NodeJS repository for more infomation.
About
Simple Raspberry Pi GPIO Pendant control for CNCjs