Have you placed printlns in your code to narrow down exactly where this occurs? It almost looks like the error occurs sometime after a serialEvent where you might have some condition your code caused that results in a bogus value. I currently have a similar error message that happens because I cannot figure out how to recover from the USB being temporarily unplugged while the program is running.
↧