Thread: Jittery Motor
View Single Post
  #9   Spotlight this post!  
Unread 17-02-2015, 00:26
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Jittery Motor

Quote:
Originally Posted by mikel392 View Post
not trying to hijack the thread but i'm having the same problem (sort of) https://www.dropbox.com/s/t9coaq7q2d...obot.java?dl=0 the lift goes up fine but it jitters a lot when reversed
Code:
    if (joyExtra.getRawButton(4))
    {
        liftup();  
      }
   
    else
    {
         
        liftstop();
  }
     
     if (joyExtra.getRawButton(2))
     {
        liftdown();  
      }
     
    else{
         
        liftstop();
  }
If button 4 is pressed, it starts the lift running up, but then the fact that button 2 is not pressed stops it immediately. You need to change the logic so that button 4 runs the lift up, button 2 runs the lift down, and only if neither button is pressed does the lift get stopped.