updated example and readme
This commit is contained in:
parent
d7d2ff4248
commit
65061d53b1
@ -66,12 +66,12 @@ SimpleSerialProtocol device;
|
||||
```
|
||||
|
||||
Initialize the serial device and connection.
|
||||
First parameter is the serial channel. For example; the mega 2560 has 4 serial channels (RX0/TX0 through RX3/TX3)
|
||||
First parameter is a serial object. For example; the mega 2560 has 4 serial channels (RX0/TX0 through RX3/TX3) so Serial, Serial1, Serial2 ... etc.
|
||||
Second parameter is the baud rate.
|
||||
```c++
|
||||
void setup() {
|
||||
// Initialize serial device on index 0 with a baud rate of 115200
|
||||
device.init(0, 115200);
|
||||
device.init(Serial, 115200);
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -18,7 +18,7 @@ void onPacket(Packet packet) {
|
||||
|
||||
void setup() {
|
||||
// Initialize (deviceOne) serial device on index 0 with a baud rate of 115200.
|
||||
deviceOne.init(0, 115200);
|
||||
deviceOne.init(Serial, 115200);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user