View Single Post
  #3   Spotlight this post!  
Unread 06-02-2009, 06:32
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Autonomous Issues!

yes, try this
Code:
 #include "WPILib.h"
class RobotDemo:public SimpleRobot
{
    RobotDrive myRobot;
    Joystick stick;
public:
    RobotDemo():
    myRobot(1,3), stick(1){}
    void Autonomous()
    { 
      myRobot.Drive(1,0);
      Wait(1);
      myRobot.Drive(0);
    }
    void OperatorControl()
    {
     while (IsOperatorControl(){
       myRobot.ArcadeDrive(stick);
       }
    }
};
this creates them as accessable inside all the functions in the class
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib