Serial on Mega crashing

Hi I'm having a Arduino Mega that i want to communicate to via the usb. But whenever i send any data to the arduino, it crashes! (the loop stops)

For example if i take the standard blink sketch and run it, it works fine. Sending data from the serial monitor doesn't influence the sketch. But if I add a Serial.begin(9600) in the setup, and nothing else, and send a byte to the arduino, the blinking stops.

The RX led blinks fine when i send it data

I'm running Arduiono IDE 22 on Mac OSX Lion. Any ideas whats going on? Is it a broken board?

Jonas

That is a symptom of a bug in avr-libc v1.6.9. You might want to check your installed versions and see what avr-libc you are using. Many Linux versions, including Debian and Ubuntu, have upgraded to Arduino v0022 and avr-libc v1.7.1, both with patches. That stopped both the Serial.begin(9600) crash in v1.6.9, and the delay(500) crash in v1.7.0.

Thanks, that did it. Reinstalled arduino. Didn't think of that :blush: