new here

ordering my arduino compatible freeduino in a few days and the motor shield kit from adafruit. i have some experience with robotics grew up with lego mindstroms. and i’ve hacked alot of toys and gadgets. so i recently found my brothers old rad robot and thought it would be cool to make it roam around on its own…i have way more planned like a control switching device from lynxmotion that will let me take r/c control of the robot when i feel the need too and the switch back to the arduino.

anyway i wrote a small code and was wondering if you guys could look it over and tell me what u think or if it will even work

#include <AFMotor.h>

AF_DCMotor motor2(2, MOTOR12_64KHZ); // create motor #2, 64KHz pwm
AF_DCMotor motor1(1, MOTOR12_64KHZ); // create motor #1, 64KHZ pwm
int valrange=0;  //variable for left sensor
int valrange2=0; //variable for right sensor
int potPin = 0;    // left sensor input
int potPin2=1; //right sensor input

void setup() {
randomSeed(analogRead(5));         //sets the random number seed with something mildly random 
motor1.setSpeed(200);               // set the speed to 200/255
motor2.setSpeed(200);               // set the speed to 200/255
}



void loop()
{

motor1.run(FORWARD);
motor2.run(FORWARD);
valrange = analogRead(potPin);    // read the value from the right sensor
valrange2= analogRead(potPin2); //read the value from the left sensor

if (valrange >= 300) //waits for the sensor value to be more than 300
{
motor1.run(RELEASE);
motor2.run(RELEASE);
delay(500);
motor1.run(BACKWARD);
motor2.run(BACKWARD);
delay(1000);
motor1.run(BACKWARD);
delay(1000);
}

if (valrange2 >= 300) //waits for the sensor value to be more than 300
{
motor1.run(RELEASE);
motor2.run(RELEASE);
delay(500);
motor1.run(BACKWARD);
motor2.run(BACKWARD);
delay(1000);
motor2.run(BACKWARD);
delay(1000);
}
}

this is what im starting with http://www.youtube.com/watch?v=Wgs9kMmVxxI my brother got one awhile back and lost the remote so i pulled its head open and pulled the "brain" out.

im buying two ir range sensors to start and i created a basic roam program (above)..i'll probably start a new project thread somewhere with some pictures and whatnot