Arduino command and control library?

Hey y’all!, I apologize if this has been answered already, but I haven’t had any luck yet. Are there any existing Arduino libraries for sending commands and receiving telemetry over uart on another Arduino not running SimpleFOC?

I have 4 motors running on different v-g431b-esc1s and I’d like to have a central Teensy4.1 synchronizing operation of these 4 motors by receiving telemetry and sending commands to each, doing some control, and forwarding telemetry/commands to/from a host PC. I saw the PacketCommaner, Command, and Telemetry classes, but those look like they’re only meant to handle the SimpleFOC side of things, and I saw the pysimplefoc, but I’d like to run this on an MCU so I can have solid timing control. Any guidance would be appreciated, thanks!

Have you considered utilizing a CAN Bus to facilitate communication among all your motors? With just a pair of cables, you can seamlessly connect as many MCUs as needed.

Yeah, it seems like it could be a good long term solution, but I’m worried I’ll be in the same position of writing a custom handler and having to deal with the increased complexity of CAN on top of that.

Yes, you’re right… using a CAN bus introduces a bit of complexity, but from my point of view, if you want and can afford to take on the additional cost, it’s a very profitable investment in the medium and long term.

Do you know of any existing CAN libraries that integrate with SimpleFOC and allow command and control from another Arduino?

If you work with STM32 or ESP32 thaen you can give a try to SimpleCAN from @Owen_Williams . It is a generic library but can be easily used to do what you want without having to deal with low level details.

1 Like