diff --git a/ModbusRTUSlave.ino b/examples/ModbusRTUSlave.ino similarity index 96% rename from ModbusRTUSlave.ino rename to examples/ModbusRTUSlave.ino index ca5d534..059d920 100644 --- a/ModbusRTUSlave.ino +++ b/examples/ModbusRTUSlave.ino @@ -1,6 +1,6 @@ #include "ModbusRTUSlave.h" -const byte buttonPin = 12, led1Pin = 11, led2Pin = 13, voltagePin = A0; +const byte buttonPin = 12, led1Pin = 13, led2Pin = 11, voltagePin = A0; const word bufSize = 256, numCoils = 1, numDiscreteInputs = 1, numHoldingRegisters = 1, numInputRegisters = 1; const byte id = 1; diff --git a/keywords.txt b/keywords.txt new file mode 100644 index 0000000..12c5540 --- /dev/null +++ b/keywords.txt @@ -0,0 +1,8 @@ +ModbusRTUSlave KEYWORD1 +configureCoils KEYWORD2 +configureDiscreteInputs KEYWORD2 +configureHoldingRegisters KEYWORD2 +configureInputRegisters KEYWORD2 +begin KEYWORD2 +poll KEYWORD2 + diff --git a/library.properties b/library.properties new file mode 100644 index 0000000..8a8a257 --- /dev/null +++ b/library.properties @@ -0,0 +1,10 @@ +name=ModbusRTUSlave +version=0.0.0 +author=C. M. Bulliner +maintainer=C. M. Bulliner +sentence=Allows communication with Modbus RTU master devices (HMIs, PLCs, etc.). +paragraph=This library enables an Arduino board to be a Modbus RTU slave/server device, able to communicate with Modbus RTU master/client devices. This library will work with any Stream object such as HardwareSerial or SoftwareSerial, and has provision for use with RS485; a driver enable pin can be set up. This library is like a kit; some assembly is required, but this allows for a lot of customization. +category=Communication +url=* +architecture=* + diff --git a/MobusRTUSlave.cpp b/src/MobusRTUSlave.cpp similarity index 100% rename from MobusRTUSlave.cpp rename to src/MobusRTUSlave.cpp diff --git a/ModbusRTUSlave.h b/src/ModbusRTUSlave.h similarity index 100% rename from ModbusRTUSlave.h rename to src/ModbusRTUSlave.h