Hey guys I have a shuttle express hooked up and working on my raspberry

Hey guys I have a shuttle express hooked up and working on my raspberry 2 and I love it, but is there a way that I can have it auto start when the pi boots, like the Json server? Sorry if it’s easy I’m a linux newb

sure… do it similar to the way you run SPJS on startup. make a script in /etc/init.d, then run update-rc.d to set it up to run on startup. For example, here’s the script I use as “/etc/init.d/shuttlecp” :

#! /bin/sh

BEGIN INIT INFO

Provides: shuttlecp

Required-Start: $all

Required-Stop:

Default-Start: 2 3 4 5

Default-Stop: 0 1 6

Short-Description: Manage my cool stuff

END INIT INFO

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin

. /lib/init/vars.sh
. /lib/lsb/init-functions

If you need to source some other scripts, do it here

case “$1” in
start)
log_begin_msg “Starting the Shuttle CP service”
cd /home/pi/installs/shuttleCP
/home/pi/installs/shuttleCP/shuttle > /tmp/shuttlecp_out.txt 2>&1 &
log_end_msg $?
;;
stop)
log_begin_msg “Stopping the Shuttle CP service”
killall -q shuttlecp
log_end_msg $?
;;
*)
echo “Usage: /etc/init.d/shuttlecp {start|stop}”
exit 1
;;
esac

exit 0

after you have that file, you would make it executable with:
sudo chmod +x /etc/init.d/shuttlecp

once it is executable, you can test and see if it works with the commands:
sudo /etc/init.d/shuttlecp start
sudo /etc/init.d/shuttlecp stop

Once you are confident it works, install it to run on startup with:
sudo update-rc.d shuttlecp defaults

And that’s it. Here’s a link that describes all that in better detail: http://www.stuffaboutcode.com/2012/06/raspberry-pi-run-program-at-start-up.html

You are the man it works great now!!! THANK YOU!!!

And thanks for the great plugin it’s awesome!

no problem. feel free to contribute. there are a few open issues… including the fact that the program should really accept arguments rathe than having constants you have to change and recompile. glad it is working for you.

Is there any chance in putting those instructions in the text saying how to get the shuttle working ?

The widget has great instructions, minus getting it to auto start. There is also a pretty good video on the bottom of it.

most of those instructions are all in the README file and up to date

Is there instructions on setting up chilipeppr on raspberry pi 2 , I am very new at this and I have one that I have been playing with try to get this up and running so I can use with a shuttle, I am willing to do the work just need sum help.

you don’t need to run Chilipeppr on the Pi2… you can run CP anywhere. Chilipeppr runs in a browser and talked to a program called “Serial Port JSON Server” or SPJS. That program also does not need to be on a raspberry pi 2 - it just needs to run on the same machine that your CNC machine is plugged into.

Do you intend on running the shuttle controller program and the SPJS on the raspberry pi 2? That’s definitely doable and how I run. I wouldn’t recommend running CP (the browser portion) on a Pi2 however.

Can I just plug raspberry pi into my laptop and run it that way ?

hmm… the raspberry pi is a whole computer, so I’m not sure what you mean by plug it into your laptop.

@Chad_Michaud Yep Chad agree about the great instructions. It is only the auto Start part. :slight_smile: also is it possible to have it re-start when ever the Chilpeppr service is re-started. So like a service dependency.

hmm… by Chilipeppr i’m assuming you mean SPJS. Certainly - you could edit the SPJS service file that is starting SPJS and have it restart the shuttleCP service.

@Frank_Graffagnino Correct Frank i did mean the SPJS.