($100 paid request) Serial/SafeString/Digital Read/Write bug is ruining my life

For BufferedInput there is
int maxStreamAvailable();
int maxBufferUsed();
Print these out every few sec to see if they have hit their maximums suggesting loss of data.

If maxStreamAvailable() >=63 and maxBufferUsed() < 511
call nextByteIn() more often
if maxBufferUsed() >= 511 increase the inputbuffer size

Each call to
int maxStreamAvailable();
int maxBufferUsed();
clears the respective maxCounter

1 Like