Codesys Pi Modbus Client polling a Modbus Server in an ESP8266 Huzzah
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 |
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 |

