Go to Post You want to make sure you got a Mike Walker and Billfred at your event so the field runs very smoothly throughout the day. - Arefin Bari [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 17-02-2012, 17:15
nubie nubie is offline
Registered User
FRC #2734
 
Join Date: Feb 2012
Location: Illinois
Posts: 4
nubie is an unknown quantity at this point
Can't read joystick values in Java

Our team is trying to implement a simple mecanum drive in Java, but whenever we try to set a motor speed based on a joystick value, the motor simply does nothing. No error is thrown, but it does not spin.

We are extending the SimpleRobot class. We are initializing the joysticks with:

Code:
private Joystick leftStick;

public RobotTemplate() {
leftStick = new Joystick(1);
and then later on...

Code:
drivetrain.tankDrive(leftStick, rightStick);

//or

leftMotor.set(leftStick.getX());
We just switched from C++ to Java and we were able to use the joysticks fine in our C++ program, so we don't think it's a control system issue.

Any help would be greatly appreciated! Thanks.
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 11:37.

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