andresarmento / modbus-arduino

A library that allows your Arduino to communicate via Modbus protocol, acting as a slave (master in development). Supports serial (RS-232, RS-485) and IP via Ethernet (Modbus IP).
BSD 3-Clause "New" or "Revised" License
455 stars 267 forks source link

example of how Hreg is updated? #12

Open F4u5t opened 8 years ago

F4u5t commented 8 years ago

I am using your library in Arduini IDE on my ESP8266. I can only see the inital value I set with AddReg. how can I update the value within the Loop()

AlexPuts commented 7 years ago

If your ModbusIP object is called mb :

mb.Hreg(offset ,value);