Serial.print Problem

33 views
Skip to first unread message

NerdBoy

unread,
Jan 16, 2011, 3:55:41 PM1/16/11
to robocontroller
When using a large number of Serial.print commands in my program, I
see the program randomly restart. If I disable printing, the program
appears to execute correctly. Has anyone experienced this issue? I am
using the Arduino ide and the arbotix robocontroller.

Michael Ferguson

unread,
Jan 16, 2011, 6:50:10 PM1/16/11
to robocon...@googlegroups.com
How many Serial.print commands is "a large number"?

Also, are you sure that each print command is correct? I've recently seen people doing some interesting concatenation (i.e. Serial.print("Hello"+X)) and having the compiler work (somehow, not even sure how...) but having the code fail (possibly with a reset).

-Fergs

Brett

unread,
Feb 1, 2011, 4:24:56 PM2/1/11
to robocontroller
I am helping out on this project and nerdboy is still having issues.
All the serial.print commands at this time are just string prints from
strings stored in Flash (Per a recommendation on a Forum) and analog
port 0 light sensor readings. The program will randomly reset and
execute from the start if printing is enabled. We disabled the reset
jumper to make sure that the serial output was not pulsing the RTS
signal on the FTDI cable, but the failure still occurred. The compile
program size is only around 5.3K with most of the prints enabled. Any
advice would be great.

Brett
> > using the Arduino ide and the arbotix robocontroller.- Hide quoted text -
>
> - Show quoted text -

Fergy

unread,
Feb 4, 2011, 8:10:06 AM2/4/11
to robocontroller
I've not previously seen anything like this issue. You might check
with the Arduino user forums if there is any discussion of such an
issue with the print command.

If you post your code, we can take a look at it and see if anything
stands out as a possible culprit.

-Fergs
Reply all
Reply to author
Forward
0 new messages