Go to Post I've always thought that what makes an average person exceptional is not their inability to make mistakes, but rather their ability to recognise, rectify, and learn from them. - artdutra04 [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
  #5   Spotlight this post!  
Unread 27-06-2014, 14:08
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,725
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: First Year with Java, Help Requested

Quote:
Originally Posted by ccresta1386 View Post
We are also in our first year and need help with programming. Our forward/backward and rotation works but strafing does not work.
Code:
 
    drive = new RobotDrive(1, 3, 2, 4); 
    driverStick = new Joystick(1);
    shooterStick = new Joystick(2);
    robotHeadingGyro = new Gyro(1);


double rotation = driverStick.getZ()*-1 / 2;                                                if (driverStick.getRawButton(3)){
rotation += .4;
 }else if(driverStick.getRawButton(4)){
rotation += -.4;
      }
               
drive.mecanumDrive_Cartesian(driverStick.getX(),
rotation,
driverStick.getY()*-1,
0);// we plan on putting a gyro in when the strafe works
Are you positive that your wheels are oriented correctly?
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 17:58.

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