Go to Post Because after Kickoff....ZOMBIE MODE, HERE WE COME! - Dorienne [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-01-2012, 23:23
Stagger007 Stagger007 is offline
Registered User
FRC #4379
 
Join Date: Jan 2012
Location: Weston, FL
Posts: 10
Stagger007 is an unknown quantity at this point
Help With Programing

Hello my team is a rookie team and its the first time we do FRC and we finally got the java image on the cRIO now were running ode that is directly copied from the java guide and its not running. Our code is as follows:
package edu.wpi.first.wpilibj.templates;


import edu.wpi.first.wpilibj.SimpleRobot;
import edu.wpi.first.wpilibj.Servo;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.Joystick;

public class RobotTemplate extends SimpleRobot {
RobotDrive drive = new RobotDrive(1, 2);
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);
/**
* This function is called once each time the robot enters autonomous mode.
*/
public void autonomous() {
for(int i =0; i < 4; i++){
drive.drive(0.5, 0.0);
Timer.delay(2.0);
drive.drive(0.0, 0.75);
Timer.delay(0.75);
}
drive.drive(0.0,0.0);
}

public void operatorControl() {
while (isOperatorControl() && isEnabled()){
drive.tankDrive(leftStick, rightStick);
Timer.delay(.005);

}

}
}
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi