Go to Post All I know is that last year in Philadelphi, our camera locked dead onto MOE (Team 365) and their flourescent green shirts during the matches. They might want to consider what would happen if they get pelted with balls during the autonomous period! :ahh: - Greg Marra [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 02-08-2014, 06:12 PM
Joey1939's Avatar
Joey1939 Joey1939 is offline
Registered User
AKA: Joey Holliday
FRC #1939 (Kuhnigits)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Kansas City, Missouri
Posts: 139
Joey1939 has a spectacular aura aboutJoey1939 has a spectacular aura aboutJoey1939 has a spectacular aura about
Motor Moving While Set To Zero

We have a motor connected to a talon. In our code the Talon should always be set to full speed forwards/backwards or zero/off. Moving the motor forward or backwards works perfectly, but whenever the motor should be set to zero/off, it continues to move backwards slowly. Any insight would be greatly appreciated.

Here is part of the code for reference:
Code:
public class OI {
    public JoystickButton rollersIn;
    
    public OI() {
        rollersIn = new JoystickButton(rotateStick, 1);
        rollersIn.toggleWhenPressed(new RollersInCommand());
    }
Code:
public class  RollersInCommand extends Command {
    public RollersInCommand() {
        requires(Robot.arm);
    }

    protected void initialize() {
        Robot.arm.rollersIn();
    }

    protected void execute() {
    }

    protected boolean isFinished() {
        return false;
    }

    protected void interrupted() {
        Robot.arm.rollersStop();   
    }
}
Code:
public class Arm extends Subsystem {
    SpeedController motor = RobotMap.armmotor;
    
    public void initDefaultCommand() {
    }
    
    public void rollersIn(){
        motor.set(-1.0);
    }
    
    public void rollersOut(){
        motor.set(1.0);
    }
    
    public void rollersStop(){
        motor.set(0.0);
    }
}
Reply With Quote
  #2   Spotlight this post!  
Unread 02-08-2014, 06:21 PM
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,547
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Motor Moving While Set To Zero

What is the LED on the Talon doing when it is moving slowly?
Reply With Quote
  #3   Spotlight this post!  
Unread 02-08-2014, 09:19 PM
heuristics heuristics is offline
Registered User
FRC #3634
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Trumbull, CT
Posts: 21
heuristics is on a distinguished road
Re: Motor Moving While Set To Zero

Try calibrating your Talon.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-09-2014, 12:42 PM
Joey1939's Avatar
Joey1939 Joey1939 is offline
Registered User
AKA: Joey Holliday
FRC #1939 (Kuhnigits)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Kansas City, Missouri
Posts: 139
Joey1939 has a spectacular aura aboutJoey1939 has a spectacular aura aboutJoey1939 has a spectacular aura about
Re: Motor Moving While Set To Zero

Quote:
Originally Posted by Joe Ross View Post
What is the LED on the Talon doing when it is moving slowly?
The light is slowly flashing red.

Quote:
Originally Posted by heuristics View Post
Try calibrating your Talon.
Okay. Thank you. I think that this will probably fix it.
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 07:33 AM.

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