You can find a very good, yet simple autonomous code on this innovation first link. It not only allows you to go forward, but you can turn in any direction. It is based on time as well so I think it would be perfect for what your looking for. You just have to change the timing, speed, and pwm settings. Its really very simple and useful. You can modify it anyway you like by simply inserting or deleting times, speeds, and directions. You can also use if statements to create switches on the robot wired to the digital inputs that will allow you to write several different autonomous modes. Consider it an improved version of dead reckoning. (dead reckoning++)?
http://www.ifirobotics.com/forum/viewtopic.php?t=75