This code is meant to allow button, jog, and shuttle events from a Contour ShuttleXpress controller to flow to the Serial Port JSON server typically used with ChiliPeppr driven CNC machines.
Interface to Shuttle Contour Xpress based on "Contour ShuttlePro v2 interface" by Eric Messick.
Purchase online
                
                Amazon.com
                
                Google Shopping
            
(Written for Raspbian, but should work for others)
sudo apt-get install libssl-dev build-essential
wget http://www.aspl.es/nopoll/downloads/nopoll-0.2.9.b194.tar.gzExtract and change into the extracted directory
tar -xzvf nopoll-0.2.9.b194.tar.gz cd nopoll-0.2.9.b19Configure, make, and install the nopoll library with the usual:
./configure make sudo make install
Change directory back to your home directory or wherever you were working from
cd ~A quick version of the wiringPi instructions
git clone git://git.drogon.net/wiringPi
cd wiringPi ./build
Change directory back to your home directory or wherever you were working from
cd ~
git clone https://github.com/lordmundi/shuttleCPChange into the shuttleCP directory
cd shuttleCP
#define SPJS_HOST     "localhost"        // Hostname where SPJS is running
#define SPJS_PORT     "8989"             // Port for SPJS
#define CYCLE_TIME_MICROSECONDS 100000   // time of each main loop iteration
#define MAX_FEED_RATE 1500.0   // (unit per minute - initially tested with millimeters)
#define OVERSHOOT     1.06     // amount of overshoot for shuttle wheel
                
                make
sudo ./shuttlecp /dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00
Demo by Frank
Walk-Through and Build of the Code