View Single Post
  #8   Spotlight this post!  
Unread 16-01-2012, 11:59
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 590
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Help With Programing

Quote:
Originally Posted by BradAMiller View Post
I just copied your program and pasted it into a new project and ran it. Other than the motor ports not matching mine, it seemed to run some motors, at least in autonomous. I didn't have joysticks on the test platform.
Brad
That was stupid... you know the test system had some servos that happened to be on those channels and naturally they moved before the motor safety stuff caught it. Change your autonomous code to look like this:
Code:
    public void autonomous() {
        drive.setSafetyEnabled(false);   // this turns off motor safety
        for (int i = 0; i < 4; i++) {
            drive.drive(0.5, 0.0);
            Timer.delay(2.0);
            drive.arcadeDrive(0.0, 0.75);  // this was a typo in the book
            Timer.delay(0.75);
        }
        drive.drive(0.0, 0.0);
    }
Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
Reply With Quote