lordmundi / shuttlecp Goto Github PK
View Code? Open in Web Editor NEWShuttleCP: Jog Dial for ChiliPeppr and bCNC
License: GNU General Public License v3.0
ShuttleCP: Jog Dial for ChiliPeppr and bCNC
License: GNU General Public License v3.0
Right now the settings for device path as well as host and port are hard-coded at the top of the file using defines. These should really be run-time arguments to the executable.
right now the code sends a gcode comment when it switches axis or speed, but John has recently added a new broadcast command to SPJS which should be used instead. He documented the new command here: https://github.com/johnlauer/serial-port-json-server
it would be nice if the shuttle device could be plugged and unplugged with the program running similar to the way that SPJS can go up and down and it automatically reconnects.
I just bought a Shuttle, plugged it in to my Raspberry pi 2, and am trying to get it to work. I'm running ChiliPeppr on my desktop, talking through the serial port JSON server on the PI, which has an Arduino Uno running GRBL talking to my Sherline CNC mill (through a Xylotex 3-axis stepper board).
Here's a screenshot showing 2 ssh connections to the pi, along with ChiliPeppr running. I can jog the mill using ChiliPeppr.
(if that doesn't work, you can get it here: https://www.dropbox.com/s/53xlb5eau65ffzz/ShuttleCP-TimedOut.png?dl=0)
ShuttleCP is failing to connect to the serial port json server. The PI is on my local network using a wifi dongle. I followed the instructions in the README in terms of installing and configuring everything needed.
Any ideas?
right now, shuttleCP is meant to be compiled and run on a raspberry pi (ideally a raspberry pi 2). It would be nice if the code also compiled and ran on a mac.
The code is already scarred to drive indicator LEDs hooked to a Pi. Also add in the ability to read in buttons to send things like feed hold, resume, etc.
Thanks for the great script!
I'll be using it on my OxCNC running GRBL and bCNC on a RPi3 with 7" official LCD.
Two questions:
1- What is the purpose of the A axis? Just to stay in-line with the Tormach implementation and allow for future expansion? I was thinking of remapping the three middle buttons to X, Y and Z and use the previously-assigned X button to Home. Thoughts?
2- I have tried to run the script on startup via init.d but it doesn't work. Have you launched your script automatically, and if yes, how did you go about it?
Regards,
Mike
Hi,
I have SPJS running on a RasPi2. No issues with ChiliPeppr and SPJS on my Pi. I followed the directions to install shuttleCP and its' dependencies. ShuttleCP connects but it takes about 10 seconds to do so. After it connects, whenever I send a command, it fails, drops the connection and takes about 10 seconds to re-connect. And on it goes. Example output from the shuttle script is as follows:
--START OF OUTPUT--
pi@raspberrypi ~/shuttleCP $ sudo ./shuttlecp /dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00
Attempting connection to localhost:8989
--10 SECOND PAUSE HERE--
Websocket connected.
Shuttle device connected.
broadcast {"id":"shuttlexpress", "action":"a"}
Sending websocket cmd: broadcast {"id":"shuttlexpress", "action":"a"}
ERROR: Only sent 0 bytes of command: broadcast {"id":"shuttlexpress", "action":"a"}
Sent 0 commands
============ Reinitializing connections
Attempting connection to localhost:8989
--10 SECOND PAUSE HERE--
Websocket connected.
Shuttle device connected.
Sending websocket cmd: send /dev/ttyACM0 G91 G0 A1.000
G90
ERROR: Only sent 0 bytes of command: send /dev/ttyACM0 G91 G0 A1.000
G90
Sending websocket cmd: send /dev/ttyACM0 G91 G0 A1.000
G90
ERROR: Only sent 0 bytes of command: send /dev/ttyACM0 G91 G0 A1.000
G90
Sent 0 commands
============ Reinitializing connections
Attempting connection to localhost:8989
--10 SECOND PAUSE HERE--
Websocket connected.
Shuttle device connected.
-- END OF OUTPUT--
I have tried three different versions of nopoll:
nopoll-0.2.7.b164
nopoll-0.2.9.b207
nopoll-0.3.1.b217
All three versions exhibit the same behavior.
Any ideas? Are there any log files anywhere that could give more info?
Nathan.
I like your module very much, but if i want to use the GPIO's with another program. How can i deactivate the wiringPi support?
Hi, @chamnit mentioned that you would like to connect your shuttleXpress jogging program with bCNC. I would be happy to help, or provide from the bCNC what is need.
Could you explain me the communication protocol.
Cheers
Vasilis
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.