Here is an example of an Arduino connecting to a wxServer in Mach4 to send data to a register, read in from an ADC.
The profile and arduino sketch are attached.
https://youtu.be/KPRF2hKFgYE
wxServer/Client examples:
https://github.com/pkulchenko/wxlua/blob/master/wxLua/samples/server.wx.lua
https://github.com/pkulchenko/wxlua/blob/master/wxLua/samples/client.wx.lua