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
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,6 +69,22 @@ Where:
69
69
| `Serial2` | 2 |
70
70
| `Serial3` | 3 |
71
71
72
+
To use a software serial port you can also use the `begin`method, this time with only a Stream* as argument, i.e.
73
+
```c++
74
+
void begin(Stream* serial)
75
+
```
76
+
77
+
Usage:
78
+
```c++
79
+
PacketSerial packet_serial;
80
+
SoftwareSerial software_serial(10, 11);
81
+
82
+
// in this case the serial port has to be initialized already when passing it to PacketSerial!
83
+
software_serial.begin(38400);
84
+
packet_serial.begin(&software_serial);
85
+
```
86
+
87
+
72
88
To receive decoded packets automatically, 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 signatur that looks like:
0 commit comments