Strange Bug related to Baud Rate?


i´m currently using a script interfacing the arduino board over serial port by declaring Serial.begin(9600);. tried several com-interfaces on computer side (command line, zterm, arduino serial monitor, pd)etc.. but i´m getting just wrong syntax. after changing the serial rate to 19200 in those programs (not in arduino-code), all of a sudden, it works, but for this project i would need a (working ;)) baud rate of 9600 as i´m using a bluetooth device which can deal only with that specific baud rate?

is there any preference (in ~/Library/Arduino/preferences.txt) which overwrites the Serial.begin definition with another value? Seems like a strange bug to me.

It might be helpful if you posted your entire code. The one line you posted looks fine, so the bug is probably somewhere else in the code. I use many different baud rates via Serial.begin(), and I have never had a problem like this.

It sounds like your Arduino sketch is running twice as fast as it thinks it is. Did you edit the build.f_cpu variable in your preferences.txt file (e.g. to work with a standalone ATmega8 without an external clock)? It should be 16000000L for the Arduino board. You could try simply renaming your preferences.txt so that the Arduino environment generates a fresh one for you. If none of that works, you could try Serial.begin(4800) which might give you a baud rate of 9600.