-
-
Notifications
You must be signed in to change notification settings - Fork 59
Description
Thanks for the great library! Just a couple of points that could be in the documentation if desired.
For those looking to use this library with other boards and other serial interfaces here is the approach I used. I applied this to a Feather M0 board which has an additional Serial1 interface defined.
Outside of any functions:
PacketSerial serial1; // Create a specific wrapper, you can call it anything
Inside of the Arduino setup() method:
Serial1.begin(9600); // Starting AdaFruit's additional serial interface
serial1.begin(&Serial1); // Wrap it with PacketSerial instance
serial1.setPacketHandler(&onPacket); // Use it for receiving...
Note 1: I used PacketSerial on Serial1 while using still using Serial for debugging output and such. So unless I read your code wrong, it seems that one can apply PacketSerial to some serial interfaces and not others based on how one wants to use the serial interface.
Note 2: I experienced full compatibility of the COBS implementation with a nice Python COBS implementation receiving data from PySerial. These folks have a good reference to the COBS Transactions on Networking (TON) paper.
Once again thanks for the library!
Cheers
Greg