Go to Post Our thanks does not have to come from their lips. It comes from the finished product that walks across the stage, gets their diploma and moves on to bigger and better things. - Koko Ed [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-02-2010, 17:47
Twisted eric's Avatar
Twisted eric Twisted eric is offline
Registered User
FRC #0581
 
Join Date: Jan 2010
Location: San Jose
Posts: 54
Twisted eric is an unknown quantity at this point
Question Programming the teleop

My programming team are stuck

like the title says I'm tying to program I don't know what I'm missing


code

package edu.wpi.first.wpilibj.templates;

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

public class Demonized extends SimpleRobot {

RobotDrive drive = new RobotDrive(1, 2);
Joystick leftStick = new Joystick(1);
Joystick rightStick = new Joystick(2);
Watchdog Fenrir = Watchdog.getInstance();

public void autonomous() {
while(true && isAutonomous() && isEnabled())
for (int i = 0; i < 4; i++) {
Fenrir.feed();
drive.drive(0.5, 0.0); // drive 50% fwd 0% turn
Fenrir.feed();
drive.drive(0.0, 0.5);
}
drive.drive(0.0, 0.0); // drive 0% fwd, 0% turn
}

public void operatorControl() {
while (true && isOperatorControl() && isEnabled()) // loop until change
{
drive.tankDrive(leftStick, rightStick);
Timer.delay(0.005);
Fenrir.feed();
}
}
}



help will be much appreciated

team 581

Last edited by Twisted eric : 16-02-2010 at 17:27. Reason: code update
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable Teleop in Robot Main ThisAintJeff NI LabVIEW 4 04-02-2010 14:33
NXT Mindstorm Teleop EXamples johncap100 FIRST Tech Challenge 4 10-10-2009 09:48
problem with passing doubles back into the "TeleOp Execute" loop windell747 NI LabVIEW 1 21-03-2009 00:50
Teleop Lag Xavier Brandall Programming 14 17-03-2009 18:21
Detecting Start of TeleOp Mode Danny Diaz Programming 4 26-02-2008 01:37


All times are GMT -5. The time now is 08:52.

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