Hi, I understand that the lua scripting environment is limited compared to something like a raspberry pi, but I was wondering whether there is support for making TCP or UDP connections over the ETH port for client and/or server (I am using a pixhawk 6x).
My testing script uses:
local socket = require(“socket”)
But I realise it is a little naive to expect the ArduPilot lua environment to support this.
My intention is to collect IMU data and send it over UDP to my companion computer (an FPGA 50 samples per second), then receive bytes over UDP from a different port.
If this is not possible via lua, what are my options? Is UART or i2c the only sensible way to communicate sending/receiving arbitrary bytes with lua?
For anyone finding this question, I did what I needed to do with UDP. The key was finding this example which shows how to set up the socket and do the server/client functions: