Skip to content

Commit d66cf7c

Browse files
committed
Comments changes in ModbusRTUTemperatureSensor
Changed comment in ModbusRTUTemperatureSensor example.
1 parent 9a9f276 commit d66cf7c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/RTU/ModbusRTUTemperatureSensor/ModbusRTUTemperatureSensor.ino

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ void loop() {
4848
Serial.println(ModbusRTUClient.lastError());
4949
} else {
5050

51-
// If the request goes fine, the sensor sent the readings as bytes packet,
52-
// through the read() function is possible read the measurments.
53-
// the readings is parsed as a short integer from the packets
51+
// If the request goes fine, the sensor sends the readings, this are
52+
// stored in the holding register and through the read() function is
53+
// possible get the temperature and the humidity as raw values.
5454
short rawtemperature = ModbusRTUClient.read();
5555
short rawhumidity = ModbusRTUClient.read();
5656

57-
// Is required divide by 10.0 the value readed, because the sensor sent the
58-
// readings as an integer obtained multipling the float value readed by 10
57+
// Is required divide by 10.0 the raw value to get the temperature in Celsius
58+
// and the humidity reading as a percentage.
5959
temperature = rawtemperature / 10.0;
6060
humidity = rawhumidity / 10.0;
6161
Serial.println(temperature);

0 commit comments

Comments
 (0)