Skip to content

Commit 4c1506e

Browse files
committed
Update README.md.
1 parent 11d12b4 commit 4c1506e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The receiver must then collect the 3 ASCII characters `{ '2', '5', '5' }`, comb
2525

2626
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:
2727

28-
```
28+
```c++
2929
Serial.print(255);
3030
Serial.print(',');
3131
Serial.print(10);
@@ -66,7 +66,7 @@ The `PacketSerial` class wraps the standard Arduino `Serial` class to automatica
6666
For Arduino boards with more than one serial port, `PacketSerial` the desired serial port can be specified with the `begin` method, i.e.
6767

6868
```c++
69-
void begin(unsigned long speed, uint8_t config, size_t port = 0)
69+
void begin(unsigned long speed, uint8_t config, size_t port = 0)
7070
```
7171
7272
Where:
@@ -85,12 +85,12 @@ Alternatively, to use a software serial port or other pre-configured network str
8585

8686
Usage:
8787
```c++
88-
PacketSerial myPacketSerial;
89-
SoftwareSerial mySoftwareSerial(10, 11);
88+
PacketSerial myPacketSerial;
89+
SoftwareSerial mySoftwareSerial(10, 11);
9090

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);
9494
```
9595
9696
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

Comments
 (0)