Originally Posted By: mlord
Bigger buffer is probably best, if you can spare the RAM.
This will be a non-issue for me when I do it all internal to the empeg. smile


Agreed. I can easily spare the RAM, but I'm trying to make this thing easy for third parties to put together themselves. Editing the Arduino compiler header files (and having to maintain that after Arduino compiler upgrades too) is a pain that I don't want to have to put anyone else through.

But at the moment it's all I've got, for the reasons you cited.

I wish I could just put "#define SERIAL_RX_BUFFER_SIZE 256" into my own code and be done with it, but of course that doesn't work.

I could look and see if rearchitecting my code to use "serialEvent()" works, i.e., if it still calls that routine even if I'm deep inside another routine. In other words, make it truly event-driven instead of polling. I could constantly build up and regularly drain a stack of completed string lines from the Empeg serial port. That might be possible if that function works the way I think it should.

In the meantime, I'm going to put a pre-check step into the Arduino sketch to print a warning message if the buffer size isn't big enough.

And then I will move on to the power supply debugging you suggested earlier - Thanks again so much for that too, that is super helpful.
_________________________
Tony Fabris