I’m new to the community and this is my first project. I’m attempting to read data from a serial port and so far I’ve been able to get pretty far. I’ve run into a slight issue with the serial buffer and I’m looking for some recommendations.
My serial connection runs at 19200. I send a short message and receive back 99 bytes of data. The serial buffer is only 64 bytes in size. At the current connection speed I’m receiving approx 2.4 bytes a millisecond. Since I’m only able to read from the buffer 1 byte at a time, I’m having issues getting all 99 bytes of data before the buffer fills up.
I’ve done some reading on others that have had this issue and they seem to say that you need to slow down the script. In my case, I think I need to speed up the scrip before the buffer runs out. Do I have that correct?
I have an option to slow down the serial protocol so the bytes don’t come into the buffer so quick. Would this be the best solution or is there something I’m missing?