I’ve had a couple of these Adafruit ESP8266 Huzzahs laying around, but I hadn’t had the time to mess with them.

I took the time tonight, and I’m glad I did.

Using the Arduino IDE, I flashed a “sketch” onto the Huzzah, that not only gives me the ability to run Arduino libraries, but I found a Modbus Server library that works with it from here:

https://github.com/andresarmento/modbus-esp8266

It worked!  I was able to set up a Modbus client on the Codesys running on the Pi, and could poll a running counter coming in on register 0.

Adafruit ESP8266 Huzzah running Arduino sketch with Modbus server library
This may not be so useful with the robot, but is super useful for remote sensing duties.  I would like to try using this for a "smart" metal detecting coil array, that houses the electronics on the coil, and transmits via Modbus TCP to my PLC over Wifi.  Think smart house with central PLC controller and a mesh of sensors feeding data.

Heres a screenshot.  Note the latency difference in numbers... I can speed this up somewhat, but I will have to tweak it.

Codesys online displaying values from Huzzah connected over Wifi via Modbus TCP