Elementary program only works WITH serial on

I am having a weird problem. I have an application on my Duemilanove that is very simple. It just turns a servo motor every 5 seconds, but instead it is turning the motor intermittently.

The problem is that it will not work unless I add "Serial.begin(9600)" at the top. The code is in this thread: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1283064513. The relevant posts are #1 and all the ones past #10.

Any ideas?

Any ideas? Yes: post your code as it looks now.

The abs() function is unnecessary and will lead to errors because it works with int-type parameters and your parameters are unsigned long. You can use labs() (long abs).

-- Check out our new shield: http://www.ruggedcircuits.com/html/gadget_shield.html

Hmffff .... This is a very, very clever idea.

The problems will occur @ 16 seconds = 3 turns. Does one really have to know this about abs()? I did not! I feel humilated....