View Single Post
  #1   Spotlight this post!  
Unread 08-01-2014, 18:55
sthreet's Avatar
sthreet sthreet is offline
Registered User
AKA: scott threet
FRC #4692
 
Join Date: Oct 2012
Rookie Year: 2012
Location: Toutle Lake
Posts: 84
sthreet is an unknown quantity at this point
Not sure if I should necro or start new thread..

...so I"ll start a new thread. Working with Java, I successfully imaged the cRIO, but I am having trouble with run. Half of the time running gives me a connection: timed out error, but when I fix it and it starts running it doesn't seem to work.

I'm not sure what the problem is, it says it is running, but even if i change
drive.tankDrive(left, right);
to
drive.tankDrive(10, 10);
the motor in pwm slot 1 doesn't do anything, even if i change to driver and enable the code.

I've been following the tutorials at
http://wpilib.screenstepslive.com/s/...s-installation
Got to the page after it, it seems running the code is all it wants me to do, but it doesn't work.

In case it is needed here is my code: (no comments)
Spoiler for code:


package edu.wpi.first.wpilibj.templates;

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


public class team4692robot extends SimpleRobot
{
RobotDrive drive = new RobotDrive(1, 2);
Joystick left = new Joystick(1);
Joystick right = new Joystick(2);

public void autonomous()
{

}

public void operatorControl()
{
while(true && isOperatorControl() && isEnabled())
{
drive.tankDrive(left, right);
Timer.delay(.005);
}
}

public void test()
{

}

}

Reply With Quote