You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ The receiver must then collect the 3 ASCII characters `{ '2', '5', '5' }`, comb
25
25
26
26
One way to send a _packet_ of data without this library is to send each byte separated by a comma or space and terminate the sequence with a new line character. Thus, to send the value `255` and the value `10`, one might call:
27
27
28
-
```
28
+
```c++
29
29
Serial.print(255);
30
30
Serial.print(',');
31
31
Serial.print(10);
@@ -66,7 +66,7 @@ The `PacketSerial` class wraps the standard Arduino `Serial` class to automatica
66
66
For Arduino boards with more than one serial port, `PacketSerial` the desired serial port can be specified with the `begin` method, i.e.
67
67
68
68
```c++
69
-
voidbegin(unsigned long speed, uint8_t config, size_t port = 0)
69
+
voidbegin(unsigned long speed, uint8_t config, size_t port = 0)
70
70
```
71
71
72
72
Where:
@@ -85,12 +85,12 @@ Alternatively, to use a software serial port or other pre-configured network str
85
85
86
86
Usage:
87
87
```c++
88
-
PacketSerial myPacketSerial;
89
-
SoftwareSerial mySoftwareSerial(10, 11);
88
+
PacketSerial myPacketSerial;
89
+
SoftwareSerial mySoftwareSerial(10, 11);
90
90
91
-
// In this case the serial port has to be initialized before passing it to PacketSerial.
92
-
mySoftwareSerial.begin(38400);
93
-
myPacketSerial.begin(&mySoftwareSerial);
91
+
// In this case the serial port has to be initialized before passing it to PacketSerial.
92
+
mySoftwareSerial.begin(38400);
93
+
myPacketSerial.begin(&mySoftwareSerial);
94
94
```
95
95
96
96
To receive decoded packets, the user should register a packet callback. The packet callback should be placed in your main Arduino Sketch and should have a method that looks like this:
0 commit comments