Open Robotics is our attempt to build a modular open source nervous system for mobile robotics applications which can be accessed, applied, and developed by anyone. For more information take a look at our wiki: http://openrobotics.pbworks.com
Tuesday, July 6, 2010
up and running
Today Geoff and Andy got the R running around the grounds. The "brains" were loaded into an arduino which was wired into the R's drive train. Sorry about the video being sideways. I don't have any video editing software just yet.
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDelete#include Servo.h /* html doesn't seem to like carrots, less than, greater than, <>, but they ought to go around the library name.*/
ReplyDeleteServo frontServo;
int motorPin = 11;
int servoPin = 10;
int stopSpeed = 127;
int maxSpeed = 145;
int turnTime = 2000;
int straightTime = 300;
int leftTurn = 75;
int rightTurn = 135;
int straight = 105;
void setup()
{
frontServo.attach(servoPin);
}
void loop()
{
for(int thrustValue = stopSpeed ; thrustValue >= maxSpeed; thrustValue +=5)
{
analogWrite(motorPin, thrustValue);
}
frontServo.write(straight);
delay(straightTime);
frontServo.write(leftTurn);
delay(turnTime);
frontServo.write(straight);
delay(straightTime);
frontServo.write(rightTurn);
delay(turnTime);
for(int thrustValue = maxSpeed; thrustValue >= stopSpeed; thrustValue -=5)
{
analogWrite(motorPin, thrustValue);
}
}
Great work hacking up the code Geoff!
ReplyDeleteCongratulations on getting the MAX robot working with the arduino!
ReplyDelete