How can I manage ports that exceed 23 using ARC @Athena? My ESP module currently supports ports higher than 23 with the integration of two PCA9685 PWM controllers, each controlling a set of servos. All connected ports have servos attached. My aim is to creatively utilize existing ARC skills and script commands to facilitate communication with the ESP.
I'm looking for a way to send commands to the ESP without setting up a TCP server, as that would impose too much overhead on the system. Ideally, I would like to find a method to send instructions that the ESP's firmware can receive. For example, is there a way to use one of the servos as a dedicated channel to receive commands for controlling the other eight servos? Please suggest a practical solution that would work efficiently.
I'm open to making minor modifications to the Arduino firmware, provided they don't add significant overhead, as the system's performance is already a concern.

Good description - thanks. You’ve got the right idea: avoid a heavy TCP server on the ESP and instead use an existing low-overhead transport that ARC already supports (serial, EZ-B UART, or lightweight UDP). Below I outline 3 practical, efficient approaches (ranked by simplicity / integration with ARC), how to implement each, and sample ARC JavaScript + minimal firmware ideas you can use. Tell me which connection method you have (ESP connected to PC via USBTTL, wired to an EZB UART, or only on WiFi) and I’ll give a tailored code example for your exact setup.
Summary of recommended options
Detailed plans and examples
What to do:
Minimal ESP firmware idea (pseudocode):
Why I recommend this: Zero extra load on WiFi, full compatibility with ARC’s servo UI, and no custom robot skill coding in ARC.
Useful links:
What to do:
Example ARC JavaScript to send one command (send servo id and pos):
Notes:
Example packet format suggestion:
Example ARC JavaScript that sends a UDP packet:
ESP side: create a UDP listener (WiFiUDP) to parse the 4byte packet and call PCA9685.setPWM(channel, pwmValue).
Which approach is right for you?
Other options and notes
Followups I need from you
If you tell me the connection type I’ll:
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
Thanks. I like your UDP listener idea as I don’t really want to physically tether a walking robot to a serial cable. UDP concerns me a little bit as I may or may not get the command so I may or may not execute it. I don’t want to continually send the same command as I would just spam the connection and we already have a ton of data from the camera flooding the wifi. So I guess important servos like robots arms legs go on assigned ports and non essential servos and PWM devices go on ports >23 I could also use this to control my neopixels instead of chewing up my assigned D Ports as if a colour doesn’t change I don’t really care.
Great - UDP is a sensible choice for an untethered walking robot. You’re right to worry about packet loss and WiFi saturation; the solution is to make the UDP layer light, idempotent, and "retry only when needed" instead of spamming. Below I give a practical, low-overhead design and concrete code you can paste into ARC (JavaScript) and a minimal ESP32 Arduino UDP receiver that’s robust to dropped or duplicate packets.
High-level strategy (what I recommend)
Packet format (recommended, minimal)
This is tiny and cheap to decode on the ESP.
ARC side: best-practice JavaScript example
Paste this into a Script robot skill (Project -> Add robot skill -> Scripting) or run from a button script. Update host/port to your ESP IP and UDP port.
ESP32 Arduino UDP receiver (minimal)
Example (simplified) - sketch skeleton. Adapt to your PCA addresses and mapping:
Notes about reliability without acks
NeoPixel specific guidance
Firewall and IP considerations
Optional: ACK-based reliability (if you want full reliability)
Next steps for me to tailor code
If you want, I’ll produce:
Would you like me to prepare those tailored files?
I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.