Go to Post Being a part of FIRST is inspirational regardless of what else happens. - Jon Stratis [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

 
Reply
Thread Tools Rate Thread Display Modes
  #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
  #2   Spotlight this post!  
Unread 08-01-2014, 19:13
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 989
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Not sure if I should necro or start new thread..

What type of motor controller are you using? Are you sure that the PWM cable is plugged in with the correct polarity on both ends and properly seated in the controller (particularly a problem with Victors)?

How about the 3 green LEDs on the Digital Sidecar? All lit bright green?

You say "it doesn't seem to work" and that the motor attached to PWM 1 doesn't do anything. How about the one attached to port 2?
Reply With Quote
  #3   Spotlight this post!  
Unread 08-01-2014, 19:24
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
Re: Not sure if I should necro or start new thread..

Also I noticed I wasn't getting the axis values from the joystick, does joystick.getY(); get the y axis value?

Tallon speed controller, negetive is closest to the cooling fins/fans, right?

The BAT, 5V, and 6V led's are lit up.

Also their is no motor hooked up to the pwn 2.

However, my mentor just noticed their is no power to the speed controller, I'll see if it works with that now.

EDIT: It was the power, it works now. Is http://lcec.us/javadoc/edu/wpi/first.../Joystick.html the best list of FRC api functions, or is their a better one somewhere?

Sorry about that, that always happens in programming, I figure it out as soon as I ask for help.

Last edited by sthreet : 08-01-2014 at 20:02.
Reply With Quote
  #4   Spotlight this post!  
Unread 09-01-2014, 22:21
thedeadlybutter thedeadlybutter is offline
Registered User
FRC #0522
 
Join Date: Jan 2013
Location: United States
Posts: 6
thedeadlybutter is an unknown quantity at this point
Re: Not sure if I should necro or start new thread..

In Netbeans you can right click whatever documentation you're looking for and click 'Show Javadoc'. Hope that helps.
Reply With Quote
Reply


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 22:32.

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