Skip to content

Commit c8b6cfe

Browse files
Merge pull request #1562 from arduino/Hannes7eicher/Modbus-fix
Modbus Code Snippet Fix
2 parents 9a1dcb0 + 72f4d58 commit c8b6cfe

File tree

1 file changed

+1
-1
lines changed
  • content/learn/05.communication/07.modbus

1 file changed

+1
-1
lines changed

content/learn/05.communication/07.modbus/modbus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Inside you can see how the `requestFrom()` is being called with *Device Address*
109109
float readVoltage() {
110110
float volt = 0.;
111111
// Send reading request over RS485
112-
if (!ModbusRTUClient.requestFrom(0x21, INPUT_REGISTERS, 30017, 2)) {
112+
if (!ModbusRTUClient.requestFrom(0x21, INPUT_REGISTERS, 30107, 2)) {
113113
// Error handling
114114
Serial.print("- Failed to read the voltage! ");
115115
Serial.println(ModbusRTUClient.lastError());

0 commit comments

Comments
 (0)