UsbSerial
UsbSerial copied to clipboard
Read with Length
Hi..
are this library can read specific length like on C programming: byte[] readBuffer = serial.read(5); //to read only 5 bytes in C
Regards, TJ.
Hi @tjstyle I would do it this way for reading 3 bytes for example:
byte[] buffer = new byte[3]; syncRead(buffer, 0);
Hi @felHR85 Thanks for your suggestion. there are any example for using sync operation for read & write?
Regards, TJ.
Hi @tjstyle This weekend I've added a little example based on the previous one using the synchronous calls. https://github.com/felHR85/UsbSerial/tree/master/examplesync
Hope it helps.