diff --git a/README.md b/README.md index 8234ad8..192217a 100644 --- a/README.md +++ b/README.md @@ -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); } ``` diff --git a/examples/ssp/ssp.ino b/examples/ssp/ssp.ino index 09139c7..07e7bea 100644 --- a/examples/ssp/ssp.ino +++ b/examples/ssp/ssp.ino @@ -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() {