Sorry about the late reply. I've been quite busy with school and all (being in High School isn't the best time for time consuming projects
) and haven't had time to respond to this.
I read your message and once I get the code/wiring working for myself (
) , I'll add a tutorial on how to add a kill switch to your Arduino robot, if that's okay.
Regarding that, is there any chance you could look at a wiring diagram/code and see why it isn't working? I'm adding the aforementioned kill-switch so I don't have to un-plug the arduino from the power source if I want to stop it.
Here's the wiring (default wiring from Arduino.cc tutorial):

and the code:
// Version 2.1.1
// Major: 2 - My first robot code, copied mostly from Foxytronics, but with tweaks of my own, like the kill button
// Minor: 1 - Minor change is the adding of the custom functions for adding of kill button
// Micro: 1 - Micro change is the adding of the custom functions for adding of kill button
#include <Servo.h>
// create servo objects
Servo leftMotor;
Servo rightMotor;
// define the states
#define DRIVE_FORWARD 0
#define TURN_LEFT 1
int state = DRIVE_FORWARD; // 0 = drive forward (DEFAULT), 1 = turn left
const int serialPeriod = 250; // only print to the serial console every 1/4 second
unsigned long timeSerialDelay = 0;
const int loopPeriod = 20; // a period of 20ms = a frequency of 50Hz
unsigned long timeLoopDelay = 0;
// specify the trig and echo pins used for the ultrasonic sensors
const int ultrasonic2TrigPin = 9;
const int ultrasonic2EchoPin = 8;
// set the pin numbers for the button
const int buttonPin = 2;
// state recorder for the button
int buttonState = 0;
int ultrasonic2Distance;
int ultrasonic2Duration;
void setup()
{
Serial.begin(9600);
// ultrasonic sensor pin configurations
pinMode(ultrasonic2TrigPin, OUTPUT);
pinMode(ultrasonic2EchoPin, INPUT);
// attach the servos
leftMotor.attach(13);
rightMotor.attach(12);
// Set up the button pin
pinMode(buttonPin, INPUT);
}
void loop()
{
debugOutput(); // prints debugging messages to the serial console
killButton(); // checks for kill button push
stateMachine();
if(millis() - timeLoopDelay >= loopPeriod)
{
readUltrasonicSensors(); // read and store the measured distances
timeLoopDelay = millis();
}
}
void killButton()
{
// read the state of the button
buttonState = digitalRead(buttonPin);
Serial.print("buttonState:");
Serial.print(buttonState);
Serial.println();
// if the state of the button is HIGH (pressed)
if(buttonState == HIGH)
{
endProgram();
}
else if(buttonState == LOW)
{
return;
}
}
void endProgram()
{
rightMotor.write(90);
leftMotor.write(90);
Serial.println("Program Killed by Physical switch");
while(1) { }
}
void stateMachine()
{
if(state == DRIVE_FORWARD) // no obstacles detected
{
if(ultrasonic2Distance > 6 || ultrasonic2Distance < 0) // if there's nothing in front of us
{
// drive forward
rightMotor.write(0);
leftMotor.write(180);
}
else // there's an object in front of us
{
state = TURN_LEFT;
}
}
else if(state == TURN_LEFT) // obstacle detected -- turning left
{
unsigned long timeToTurnLeft = 1100; // it takes about 1.1 seconds to turn 90 degrees
unsigned long turnStartTime = millis(); // save the time that we started turning
while((millis()-turnStartTime) < timeToTurnLeft) // stay in this loop until timeToTurnLeft (1.1 seconds has elapsed)
{
// turn left
rightMotor.write(0);
leftMotor.write(0);
}
state = DRIVE_FORWARD;
}
}
void readUltrasonicSensors()
{
//ultrasonic 2
digitalWrite(ultrasonic2TrigPin, HIGH);
delayMicroseconds(10); // must keep the trig pin high for at least 10us
digitalWrite(ultrasonic2TrigPin, LOW);
ultrasonic2Duration = pulseIn(ultrasonic2EchoPin, HIGH);
ultrasonic2Distance = (ultrasonic2Duration/2)/29;
}
void debugOutput()
{
if ((millis() - timeSerialDelay) > serialPeriod)
{
Serial.print("ultrasonic2Distance: ");
Serial.print(ultrasonic2Distance);
Serial.print("cm: ");
Serial.println();
timeSerialDelay = millis();
}
}
The serial console prints that the button has been pushed, even though I haven't pushed the kill button and the robot never really runs. The left motor just sputters along (and is emitting that this-can't-be-good-the-motor's-hot smell) and the right never turns on. Do you know why this is?
I believe it may have to do with the wiring, as when I run a simple button-state check (directly from the Arduino site):
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the pushbutton pin as an input:
pinMode(buttonPin, INPUT);
Serial.begin(9600);
}
void loop(){
// read the state of the pushbutton value:
buttonState = digitalRead(buttonPin);
// check if the pushbutton is pressed.
// if it is, the buttonState is HIGH:
if (buttonState == HIGH) {
// turn LED on:
Serial.println("HIGH");
}
else {
// turn LED off:
Serial.println("LOW");
}
}
it fluctuates back and forth between high and low, in the Serial console printing HIGH then LOW twice:
HIGH
LOW
LOW
HIGH
LOW
LOW
...
This is really most perturbing 
That, and (not related to the kill switch) the left servo tends to move for a bit if I have to plug the power or ground wires from the pack to the breadboard in again. Do you have any clue why?