Skip to content

Commit 3589a31

Browse files
committed
use internal timeout for serial read
1 parent 4e78871 commit 3589a31

File tree

3 files changed

+111
-97
lines changed

3 files changed

+111
-97
lines changed

examples/simple/simple.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
Modbus slave simple example
33
44
Control and Read Arduino I/Os using Modbus serial connection.
5-
5+
66
This sketch show how to use the callback vector for reading and
77
controleing Arduino I/Os.
8-
8+
99
* Controls digital output pins as modbus coils.
1010
* Reads digital inputs state as discreet inputs.
1111
* Reads analog inputs as input registers.
@@ -44,14 +44,14 @@ void setup() {
4444
pinMode(11, OUTPUT);
4545
pinMode(12, OUTPUT);
4646
pinMode(13, OUTPUT);
47-
47+
4848
/* register handler functions
4949
* into the modbus slave callback vector.
5050
*/
5151
slave.cbVector[CB_WRITE_COIL] = writeDigitlOut;
5252
slave.cbVector[CB_READ_COILS] = readDigitalIn;
5353
slave.cbVector[CB_READ_REGISTERS] = readAnalogIn;
54-
54+
5555
// start slave at baud 9600 on Serial
5656
slave.begin( BAUDRATE );
5757
}
@@ -62,7 +62,7 @@ void loop() {
6262
* on a request, handle the request.
6363
* if the request has a user handler function registered in cbVector
6464
* call the user handler function.
65-
*/
65+
*/
6666
slave.poll();
6767
}
6868

0 commit comments

Comments
 (0)