I searched the web for ready-made examples for calculating the RTU CRC16 for the ESP8266 and it didn't work, so I wrote my own code and and to make it easier for others to play with ESP with RS485 I give the solution. in the example.
After pasting the script, all you need to do as in the example is to write
CRC16M("here in HEX our command, and as a result we get, command + calculated CRC). That is, by typing the function:
the result will be
01050000FF00 3A8C
Code: Lua
After pasting the script, all you need to do as in the example is to write
CRC16M("here in HEX our command, and as a result we get, command + calculated CRC). That is, by typing the function:
Code: Lua
the result will be
01050000FF00 3A8C