Arduino stops responding in xbee controlled robot

Hello! i'm making a robot, based on arduino and xbee. I'm using an md23 board to control 2 motors. Now, until some days ago everything was working fine. Now, after a couple of minute of operation, the arduino board seems to stop responding completely. The leds on the XBee are ok (they flash when receiving something), but the led on the arduino (which is programmed to flash too) stops. I thought it could be becouse of lack of current, but i'm using a big lead-acid battery that should supply plenty of power. I tried to put a capacitor in the way but it doesn't help. Also, the board stops randomly, even if the robot is just running smoothly (no motor stalls or such).

Could it be that the vibration are the cause ? the chassis vibrate a lot..

Any help is appreciated :)

uhm it looks like the issue is AFSoftwareSerial, that i was using.. switching to standard Serial avoids the freezing.

Using arduino-0012 or 0013 on OSX?

If so, there's a bug in the compiler included that generates bad interrupt code that leads to crashes. AFSoftwareSerial is affected by this.

See this discussion about NewSoftSerial which is an evolution of AFSoftSerial and has subsequently been updated to work-around the compiler bug.

thanks etracer. i’m using 0013 on windows. could it be still affected ? i’ll look into switching to NewSoftSerial, thanks for the hint!

As far as we know, the compiler bug doesn't affect the Windows version. NewSoftSerial does have a number of improvements and bug fixes so it still might work better for you.

Ok, tested with NewSoftwareSerial and that solved the problem. Thanks etracert