Fork me on GitHub
v3.0.6 v3.1.4


A Modbus library for Linux, Mac OS X, FreeBSD, QNX and Win32
libmodbus for Arduino (almost!)
libmodbus , arduino

The libmodbus project is a real success on many platforms and to conquer the world, I've written a version dedicated to Arduino devices. My goals are:

OK, you're right, other projects exist already:

So I've extracted/adapted only the slave, RTU, reading/writing registers of libmodbus. To reduce the footprint even further, I've replaced the fast CRC code based on precomputed arrays (512 bytes) by a slow one (not so slow!). The result is clean library for Arduino able to handle exceptions if an error occurs.

The binary sketch size is 2,450 bytes and around 1,830 bytes of memory still free when running on 2K SRAM model.

The source code is available on github and have the project is referenced in the playground wiki.