XBox Controller to Two Actuators at Same Time

I made progress getting an XBox controller to control two disparate actuators at the same time. Since each actuator has its own ESP32, and thus its own IP address, it’s fairly fancy what’s going on here.

Here’s the new widget for ChiliPeppr

Here’s both actuators showing up in the Cayenn Devices widget. This widget listens for broadcasts from the actuators announcing their presence on the network. Once it hears it, it records it’s name, and then allows other widgets to send/receive data from the actuator.

So, the Xbox widget is just publishing moves out to the Cayenn widget and the Cayenn widget is sending them via SPJS to the actuator itself.

The Cayenn widget is pretty fancy. It also shows all of the commands available on the device. This lets you debug, interact, but also is self-documenting because those are the commands you publish to the device. So, for example you can see the “JogStart”, “JogStop”, and “JogFreq” commands available on the actuator. Those are the commands the XBox widget is publishing based on events read from the XBox controller.

I’m not happy with the response time though. It just feels really laggy.

2 Likes