Serial Port

I read through this old topic Here

http://forum.arduino.cc/index.php/topic,48480.0.html

and wondered if the bug it mentions has now been fixed? if not, does anyone have a link to the workaround it mentions (but doen't link) in the thread? I suspect after a few iterations, it's running out of memory as I'm concatenating bytes onto a local string variable.

I'm seeing a very similiar issue when I connect my Arduino (fairly new UNO board) to my rPI. Basically, after sending a few messages through, it hangs and won't show any more data. I was going for a scrolling display, so was hoping that the program on the Pi could run all the time.

{I'm using Arduino s/w version 1.5.4}

Thanks, ace

and wondered if the bug it mentions has now been fixed?

In 1.0.4, yes.

I'm using Arduino s/w version 1.5.4

Why? That version is needed only for the ARM boards, which the UNO isn't.

The easiest way to avoid the String issue is, of course, not to use Strings. NOTHING requires them.

ok - so I should stick to plain char*?

I realize I'm asking a slightly generic question here, but are there any other gotchas to be aware of with polling the serial port for a long period of time?

Currently, I'm doing the following:

inside

loop()

I'm doing a

Serial.available() check, and then accumulating the data into a string via concat() calls, and then writing it out to the display.

Thanks much, Ace

so I should stick to plain char *

Probably not. A character pointer has to point to some allocated memory. A char array, on the other hand alread points to allocated memory.

and then accumulating the data into a string via

A string is a NULL terminated array of chars. A NULL terminated array of chars does not have a concat method.

The String class is an abomination that should be avoided. It has a concat method.