With the new Cayenn protocol, your add-on devices are new toolheads.

With the new Cayenn protocol, your add-on devices are new toolheads. The device announces which widget is the software UI. In that widget you can define a 3D object to represent the toolhead so it appears in the main 3D viewer. Here’s the concept for a dispenser. This is the preview of the 3D object for the dispenser inside the Cayenn control panel widget.

This is so cool

I’m hoping ChiliPeppr becomes the home of tons of add-on toolheads that the community develops and can easily plug-in to their CNC by just flicking them on and they appear.

Awesome john, great work!

@Frank_Herrmann we need a Cayenn widget/device for your XATC. It could control the servo that grabs the spindle head that locks it.

@jlauer sadly, i’m in vacation now. Do u have a link to this new widget?

@jlauer one question, ur cayenne/habanero protocol works perfect now? At this time i use a arduino connected via serial port on spjs. You’re design need an esp8266 and wait for downloading g-code to call this later if he get the correct sync counter. The XATC control the spindle and servo and its a complex process. Can we convert this to ur new protocol or we have wait a little bit?

I’m getting closer on the protocol. I’m working on the portion right now where data comes back into ChiliPeppr. I have the outgoing working nicely via UDP and TCP. SPJS v1.93 is checked into Github but no release yet because I’ll have to add more features for the data coming back. The common commands for toolheads are: { “ResetCtr”, “GetCmds”, “GetQ”, “WipeQ”, “CmdQ”}

And then for a specific device like a dispenser the following custom commands are defined
{ “AugerFwd”, “AugerRev”, “AugerOff”, “AirOn”, “AirOff”, “LinearSlideOn”, “LinearSlideOff” }

I think there’s a way to go here because I don’t have the Gcode widget pre-processing the Gcode yet to generate the command queues to distribute out to the Cayenn devices. That process will also generate the CounterId’s and insert the M7/M9 lines into the Gcode to ensure the sync counter is created. That process will also send the CmdQ to each Cayenn device and wait for a receipt that the device has the data.

Then, on play of Gcode a ResetCtr is sent to each Cayenn device, so that process has to get built.

I’m up for you starting to go down the road with me though because I think your XATC could help define what’s missing in the protocol. I started Cayenn enabling my laser last night too to make sure the protocol had enough stuff in it and what I found was I need the current/voltage data flowing back in from my laser driver INA219 sensor. So I’m using UDP to do that because that data does not have to be guaranteed, rather it needs to be realtime.

Ok, for xatc we need commands with additional parameters. I.e. Servo(135) to move the servo to 135 degrees or SpindleFwd(100, 200) rotate spindle with 25% power for 200 milliseconds. Please add the feature for additional parameters. Cuz of ur brilliant idea we should not have a delay and i guess this will work :slight_smile:

You’ll see in that blog post I just did that commands can take additional parameters like speed, etc.

Yeah, i read this article three times … i love it!

I want to try convert ur lua code to c++ at Arduino ide with esp8266 support. Do u think that’s possible?

Absolutely. I think it would be easy to convert. The code isn’t really doing too much work. Dispenser.lua is just a big if/then/else. Cayenn.lua is Wifi setup, UDP Server setup, and TCP Server setup. The rest is just reading pins.

ChiliPeppr podría incorporar esto en el widget 3D Viewer y también poder interarticular con los sensores por medio de Serial Port JSON Server?

como puedo editar la parte de animación 3D?

Yes, the idea is that you could inject your alternate toolhead 3d representation into the 3d viewer. Still work in progress.

como puedo ayudar! quisiera aprender a editar la parte del 3D widget para poder hacer diferentes tipos de dispositivos ya sabes sensores, cambios de herramienta etc me interesa mucho el diseño.
la idea es que pueda mostrar visualmente en el widget la animación de un cambio de herramienta que en ese momento este realizando la cnc.

I recommend you look at the Cayenn widget on Github then to see how I did it. You should use the 3d editor at http://threejs.org to define your 3d object and then import it into your Javascript.

ok