View Single Post
  #3   Spotlight this post!  
Unread 13-02-2014, 09:13
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,717
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: Programming Victors in Java

Code:
if(operator.getRawButton(6)) {
     Pulley.set(-1.0);
} else if(operator.getRawButton(3)) {
     Pulley.set(1.0);
} else  {
     Pulley.set(0);
}

if(operator.getRawButton(4)) {
     Scoop.set(-1.0);
} else if(operator.getRawButton(5)) {
     Scoop.set(1.0);
} else {
     Scoop.set(0);
}

if(operator.getRawButton(1)) {
     Window.set(-1.0);
} else if(operator.getRawButton(2)) {
     Window.set(1.0);
} else  {
     Window.set(0);
}
One thing just for future reference. Convention when writing java is to name your variables with a lowercase letter for the first letter. Also, can I see the code you used to set up the motors? What is the light doing on the motor controller when you try to run it?

P.S. I didn't change anything in the code, just reorganized it a bit.
Reply With Quote