Go to Post Success is realizing that anything is possible, persistence is the key. - SlamminSammy [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 15-02-2016, 18:43
Lesafian Lesafian is offline
Registered User
AKA: Jeremy Styma
FRC #6077 (Wiking Kujon)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2016
Location: Posen, Michigan
Posts: 22
Lesafian is an unknown quantity at this point
Issues with LimitSwitch

Hey guys!

I'm having troubles with programming limit switches. We're using a limit switch to stop our arms from going too low. The problem I'm having, is that the limit switch stops the motor, but then the entire robot stops working. Obviously that's a problem with the code. I'm not sure what to do though. I'll paste all of our robot code.

Code:
package org.usfirst.frc.team6077.robot;

import edu.wpi.first.wpilibj.CameraServer;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.Counter;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.VictorSP;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;

public class Robot extends SampleRobot {

	// RobotDrive Declaration
	RobotDrive drive;

	Compressor compressor;
	DoubleSolenoid doublesolenoid;
	Solenoid solenoid;
	
	DigitalInput limitSwitch;
	Counter counter;
	
	CameraServer server;

	Joystick xboxController;

	VictorSP armMotor, slideMotor, drivemotor1, 
	drivemotor2, drivemotor3, drivemotor4;
	
	final String defaultAuto = "Default";
	final String customAuto = "Autonomous Choice 1";
	final String customAuto2 = "Autonomous Choice 2";
	final String customAuto3 = "Autonomous Choice 3";
	final String customAuto4 = "Autonomous Choice 4";
	final String customAuto5 = "Autonomous Choice 5";

	SendableChooser chooser;

	public void robotInit() {

		drivemotor1 = new VictorSP(0);
		drivemotor2 = new VictorSP(1);
		drivemotor3 = new VictorSP(2);
		drivemotor4 = new VictorSP(3);
		armMotor = new VictorSP(5);
		slideMotor = new VictorSP(6);

		compressor = new Compressor(0);
		compressor.setClosedLoopControl(true);
		
		drive = new RobotDrive(drivemotor1, drivemotor2, drivemotor3, drivemotor4);
		drive.setExpiration(0.1);

		xboxController = new Joystick(0);

		doublesolenoid = new DoubleSolenoid(0, 1);
		//solenoid = new Solenoid(2);

		server = CameraServer.getInstance();
		server.setQuality(100);
		server.startAutomaticCapture("cam1");
		
		chooser = new SendableChooser();

		chooser.addDefault("Default Auto", defaultAuto);
		chooser.addObject("Autonomous Choice 1", customAuto);
		chooser.addObject("Autonomous Choice 2", customAuto2);
		chooser.addObject("Autonomous Choice 3", customAuto3);
		chooser.addObject("Autonomous Choice 4", customAuto4);
		chooser.addObject("Autonomous Choice 5", customAuto5);
		SmartDashboard.putData("Autonomous Chooser", chooser);
	}

	public void autonomous() {
		drive.setSafetyEnabled(false);
		String autoSelected = (String) chooser.getSelected();
		System.out.println("Autonomous Mode selected: " + autoSelected);

		switch (autoSelected) {

		case customAuto5:
			break;
		case customAuto4:
			break;
		case customAuto3:
			break;
		case customAuto2:
			break;
		case customAuto:
			break;
		case defaultAuto:
		default:
			break;
		}
		Scheduler.getInstance().run();
	}

	public void operatorControl() {
		drive.setSafetyEnabled(true);
		while (isOperatorControl() && isEnabled()) {
			while (counter.get() > 0) {
                             armMotor.stopMotor();
		}
			
		//drive.tankDrive(xboxController.getRawAxis(2), xboxController.getRawAxis(5));
		drive.arcadeDrive(xboxController.getRawAxis(1), -xboxController.getRawAxis(0));

		// Lift and lower the arms using the left and right trigger.

		if (Math.abs(xboxController.getRawAxis(3)) > .1) {
			armMotor.set(xboxController.getRawAxis(3));
		} else if (Math.abs(xboxController.getRawAxis(2)) > .1) {
			armMotor.set(-xboxController.getRawAxis(2));
		} else {
			armMotor.stopMotor();
		}
		
		// Move sliding mechanism forwards and backwards

		if (Math.abs(xboxController.getRawAxis(5)) > .1) {
			slideMotor.set(xboxController.getRawAxis(5));
		} else {
			slideMotor.stopMotor();
		}
		
		// Open and close the claw

		if (xboxController.getRawButton(2)) {
			doublesolenoid.set(DoubleSolenoid.Value.kForward);
		} else if (xboxController.getRawButton(1)) {
			doublesolenoid.set(DoubleSolenoid.Value.kReverse);
		}
		
		Timer.delay(0.005); //Wait for a motor update time
		}
	}
	public void test() {

	}
}
I feel like it's a problem with the while loop.
Code:
			while (counter.get() > 0) {
                            armMotor.stopMotor();
		}
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2016, 18:50
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 236
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Issues with LimitSwitch

Quote:
Originally Posted by Lesafian View Post

I feel like it's a problem with the while loop.
Code:
			while (counter.get() > 0) {
                            armMotor.stopMotor();
		}

You'd be right. What does a while loop do? Yours will continuously be true so it will never break the loop.

What is the point of the counter by the way? There's probably a way to do what you want without this.
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2016, 19:00
CyberTeam5713 CyberTeam5713 is offline
Registered User
FRC #5713
 
Join Date: Feb 2016
Location: Michigan
Posts: 25
CyberTeam5713 is an unknown quantity at this point
help im new to this

I was researching how to program xbox controller to arcade and use one analog stick. Im using talons so what is speed control? and how do i program the xbox controller

public void teleopPeriodic() {
while (isOperatorControl() && isEnabled()) {
drive.setSafetyEnabled(true);
double speedControl = 1;
double joystickLeftY = mXboxController.getRawAxis(1)*speedControl;
double joystickLeftX = mXboxController.getRawAxis(0)*-1*speedControl;
drive.arcadeDrive(joystickLeftY, joystickLeftX);
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2016, 20:58
Lesafian Lesafian is offline
Registered User
AKA: Jeremy Styma
FRC #6077 (Wiking Kujon)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2016
Location: Posen, Michigan
Posts: 22
Lesafian is an unknown quantity at this point
Re: Issues with LimitSwitch

It shouldn't. When the lever isn't pressed the value is supposed to be 0, correct?
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2016, 21:23
kmodos kmodos is offline
Registered User
AKA: Alex
FRC #1126 (SparX)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: New York
Posts: 57
kmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to beholdkmodos is a splendid one to behold
Re: Issues with LimitSwitch

Quote:
Originally Posted by Lesafian View Post
It shouldn't. When the lever isn't pressed the value is supposed to be 0, correct?
It is a DIO, thus it returns true or false, not an int.
Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2016, 10:22
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,212
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Issues with LimitSwitch

> while (counter.get() > 0)

You never initialize the counter. While that may be ok, I suggest doing that in RobotInit, just in case. At a minimum, I think you have to tell it which DIO channel to watch.

However, it doesn't really do anything in your code. It counts the number of presses, so it should always be >0 after the first press. You either want to see if it is pressed, or not. It doesn't do you much good to count the number of times it is pressed.

Last edited by rich2202 : 16-02-2016 at 10:35.
Reply With Quote
  #7   Spotlight this post!  
Unread 16-02-2016, 18:49
Lesafian Lesafian is offline
Registered User
AKA: Jeremy Styma
FRC #6077 (Wiking Kujon)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2016
Location: Posen, Michigan
Posts: 22
Lesafian is an unknown quantity at this point
Re: Issues with LimitSwitch

Quote:
Originally Posted by rich2202 View Post
> while (counter.get() > 0)

You never initialize the counter. While that may be ok, I suggest doing that in RobotInit, just in case. At a minimum, I think you have to tell it which DIO channel to watch.

However, it doesn't really do anything in your code. It counts the number of presses, so it should always be >0 after the first press. You either want to see if it is pressed, or not. It doesn't do you much good to count the number of times it is pressed.
How would this be possible?
Reply With Quote
  #8   Spotlight this post!  
Unread 16-02-2016, 22:00
TimTheGreat's Avatar
TimTheGreat TimTheGreat is offline
ArchdukeTim
FRC #1418 (Vae Victis)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Falls Church
Posts: 236
TimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura aboutTimTheGreat has a spectacular aura about
Re: Issues with LimitSwitch

Quote:
Originally Posted by Lesafian View Post
How would this be possible?
Code:
switch = DigitalInput(0)
if switch.get()
{
    do stuff
}
__________________
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.



2012 - Gracious Professionalism - Greater DC
2014 - Regional Finalist - Virginia | Industrial Design - Virginia | Regional Finalist - Greater DC
2015 - Innovation in Control - Greater DC
2016 - District Event Winner - VAHAY | Innovation in Control - VAHAY | District Event Winner - MDBET | Industrial Design - MDBET | District Champion - CHCMP | Innovation in Control - CHCMP
Reply With Quote
  #9   Spotlight this post!  
Unread 17-02-2016, 15:25
Lesafian Lesafian is offline
Registered User
AKA: Jeremy Styma
FRC #6077 (Wiking Kujon)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2016
Location: Posen, Michigan
Posts: 22
Lesafian is an unknown quantity at this point
Re: Issues with LimitSwitch

Quote:
Originally Posted by TimTheGreat View Post
Code:
switch = DigitalInput(0)
if switch.get()
{
    do stuff
}
This does not work.
Reply With Quote
  #10   Spotlight this post!  
Unread 17-02-2016, 15:29
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,212
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Issues with LimitSwitch

Quote:
Originally Posted by Lesafian View Post
This does not work.
Post your code.

Errors?
Doesn't execute the code?
Which DIO port is it on?
Reply With Quote
  #11   Spotlight this post!  
Unread 17-02-2016, 16:05
Lesafian Lesafian is offline
Registered User
AKA: Jeremy Styma
FRC #6077 (Wiking Kujon)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2016
Location: Posen, Michigan
Posts: 22
Lesafian is an unknown quantity at this point
Re: Issues with LimitSwitch

Quote:
Originally Posted by rich2202 View Post
Post your code.

Errors?
Doesn't execute the code?
Which DIO port is it on?
It's on DIO port 0. There should be no issues, if you can spot one let me know though!

Code:
package org.usfirst.frc.team6077.robot;

import com.ni.vision.NIVision;
import com.ni.vision.NIVision.Image;

import edu.wpi.first.wpilibj.CameraServer;
import edu.wpi.first.wpilibj.Compressor;
import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.Timer;
import edu.wpi.first.wpilibj.VictorSP;
import edu.wpi.first.wpilibj.command.Scheduler;
import edu.wpi.first.wpilibj.smartdashboard.SendableChooser;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
	
public class Robot extends SampleRobot {

    // Declarations
	boolean limit1b;
	int session;
	
	Image frame;
	
	RobotDrive drive;
	
	Compressor compressor;
	
	DoubleSolenoid claw;
	Solenoid pusher;
	
	DigitalInput limit1;

	Joystick xboxController;
	Joystick logitech3dpro;
	
	VictorSP drivemotor1;
	VictorSP drivemotor2;
	VictorSP drivemotor3;
	VictorSP drivemotor4;
	VictorSP slideMotor;
	VictorSP armMotor;

	// Autonomous Names
	final String defaultAuto = "Default";
	final String customAuto = "Autonomous Choice 1";
	final String customAuto2 = "Autonomous Choice 2";
	final String customAuto3 = "Autonomous Choice 3";
	final String customAuto4 = "Autonomous Choice 4";
	final String customAuto5 = "Autonomous Choice 5";

	// Chooser
	SendableChooser chooser;

	public Robot() {
		
        frame = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);

        session = NIVision.IMAQdxOpenCamera("cam0",
                NIVision.IMAQdxCameraControlMode.CameraControlModeController);
        NIVision.IMAQdxConfigureGrab(session);
        
		//Change values later
		drivemotor1 = new VictorSP(0);
		drivemotor2 = new VictorSP(1);
		drivemotor3 = new VictorSP(2);
		drivemotor4 = new VictorSP(3);
		
		compressor = new Compressor(0);
		
		drive = new RobotDrive(drivemotor1, drivemotor2,
				drivemotor3, drivemotor4);
		drive.setExpiration(0.1);
		
		xboxController = new Joystick(0);
		logitech3dpro = new Joystick(1);
		
		armMotor = new VictorSP(5);
		slideMotor = new VictorSP(4);

		claw = new DoubleSolenoid(0, 1);
		pusher = new Solenoid(2);
		
		limit1 = new DigitalInput(0);

		chooser = new SendableChooser();

	}

	public void robotInit() {
		compressor.setClosedLoopControl(true);
		compressor.start();
		chooser.addDefault("Default Autonomous", defaultAuto);
		chooser.addObject("Autonomous Choice 1", customAuto);
		chooser.addObject("Autonomous Choice 2", customAuto2);
		chooser.addObject("Autonomous Choice 3", customAuto3);
		chooser.addObject("Autonomous Choice 4", customAuto4);
		chooser.addObject("Autonomous Choice 5", customAuto5);
		SmartDashboard.putData("Autonomous Chooser", chooser);
	}

	public void autonomous() {
		drive.setSafetyEnabled(false);
		String autoSelected = (String) chooser.getSelected();
		System.out.println("Autonomous Mode selected: " + autoSelected);

		switch (autoSelected) {

		case customAuto5:
			 /*Only use if have to
			 * Goal: Go through the portcullis & pick up a ball
			 * Note: Values might change as testing is done
			 */
			
			//Drive forwards while lowering arms to default
			drive.drive(1, 0);
			armMotor.set(-0.5);
			Timer.delay(1);
			
			armMotor.set(1);
			Timer.delay(1);
			drive.drive(1, 0);
			Timer.delay(2);
			
			drive.drive(0.5, 1);
			claw.set(DoubleSolenoid.Value.kForward);
			Timer.delay(1);
			claw.set(DoubleSolenoid.Value.kOff);			
			break;
		case customAuto4:
			/*Hallway autonomous test
			 * Goal: Drive forwards, turn around, come back
			 */
			drive.drive(-0.25, 0);
			Timer.delay(3);
			drive.drive(0.50, 1);
			Timer.delay(1.75);
			drive.drive(-0.1, 0);
			
			break;
		case customAuto3:
			break;
		case customAuto2:
			break;
		case customAuto:
			break;
		case defaultAuto:
		default:
			/*Preferred w/ preferred spawn point
			Goal: Go through the low bar and pick up a ball. */
			
			//Drive forwards
			drive.drive(-1, 0);
			Timer.delay(0.5);
			drive.drive(0, 0);
			armMotor.set(-1);
			Timer.delay(0.5);
			armMotor.stopMotor();
			claw.set(DoubleSolenoid.Value.kReverse);
			Timer.delay(1);
			claw.set(DoubleSolenoid.Value.kForward);
			Timer.delay(1);
			
			break;
		}
		Scheduler.getInstance().run();
	}

	public void operatorControl() {
        NIVision.IMAQdxStartAcquisition(session);
		drive.setSafetyEnabled(true);
		while (isOperatorControl() && isEnabled()) {
	           NIVision.IMAQdxGrab(session, frame, 1);
	           CameraServer.getInstance().setImage(frame);
	           
	          //Forwards limitswitch for slide motor.
	           if (limit1.get()) {
	        	   
	        	  slideMotor.stopMotor();
	        	  
	           }
	           
			compressor.start();
			// Move robot using left and right joystick
			//drive.tankDrive(xboxController.getRawAxis(1), xboxController.getRawAxis(5));
			drive.arcadeDrive(xboxController.getRawAxis(1), -xboxController.getRawAxis(0));

			// Lift and lower the arms using the right and left bumper.
			
			//Arm Motor Test With Triggers
			if (Math.abs(xboxController.getRawAxis(3)) > .1) {
				
				armMotor.set(xboxController.getRawAxis(3));
				
			} else if (Math.abs(xboxController.getRawAxis(2)) > .1) {
				
				armMotor.set(-xboxController.getRawAxis(2));
				
			} else {
				
				armMotor.set(0);
				
			}
		
			// Move sliding mechanism forwards and backwards
			
			if (Math.abs(xboxController.getRawAxis(5)) > .1) {
     
				slideMotor.set(-xboxController.getRawAxis(5));
		
			} else {
				
				slideMotor.set(0);
            }

			// Open and close the claw
			if (xboxController.getRawButton(1)) {
				
				claw.set(DoubleSolenoid.Value.kForward);
				
			} else if (xboxController.getRawButton(4)) {
				
				claw.set(DoubleSolenoid.Value.kReverse);
			}
			
			//Open and close pushing cylinder
			if (xboxController.getRawButton(3)) {
				
				claw.set(DoubleSolenoid.Value.kReverse);
				pusher.set(true);
				
			} else if (xboxController.getRawButton(2)) {
				
				pusher.set(false);
			}
			
			//Logitech 3D PRO
			if (logitech3dpro.getRawButton(1)) {
				
				pusher.set(true);
				claw.set(DoubleSolenoid.Value.kReverse);
				
			} 
			
			if (logitech3dpro.getRawAxis(1) > .1) {
				
				claw.set(DoubleSolenoid.Value.kReverse);
				
			} else if (logitech3dpro.getRawAxis(1) < -.1) {
				
				claw.set(DoubleSolenoid.Value.kForward);
			}
			
			Timer.delay(0.005); //Wait for a motor update time
			
		}
		
        NIVision.IMAQdxStopAcquisition(session);
	}
	public void test() {
	}
}
Reply With Quote
  #12   Spotlight this post!  
Unread 17-02-2016, 18:27
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,212
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Issues with LimitSwitch

At the beginning of OperatorControl, you check the limit switch, and stop slidemotor if it the switch is true.

So, make sure the limit switch returns 1 (true) when it is reached, and 0 (false) when it is not.

However, you code continues to execute, and at:
Quote:
if (Math.abs(xboxController.getRawAxis(5)) > .1) {

slideMotor.set(-xboxController.getRawAxis(5));

} else {
you set the speed of the motor, without regard to the limit switch.
Reply With Quote
  #13   Spotlight this post!  
Unread 17-02-2016, 20:13
Lesafian Lesafian is offline
Registered User
AKA: Jeremy Styma
FRC #6077 (Wiking Kujon)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2016
Location: Posen, Michigan
Posts: 22
Lesafian is an unknown quantity at this point
Re: Issues with LimitSwitch

Quote:
Originally Posted by rich2202 View Post
At the beginning of OperatorControl, you check the limit switch, and stop slidemotor if it the switch is true.

So, make sure the limit switch returns 1 (true) when it is reached, and 0 (false) when it is not.

However, you code continues to execute, and at:


you set the speed of the motor, without regard to the limit switch.
So would something like this fix it?

Code:
			if (limit1.get() == true) {
				
				slideMotor.stopMotor();
				
			} else if (limit1.get() == false) {
				
				if (Math.abs(xboxController.getRawAxis(5)) > .1) {
					
					slideMotor.set(xboxController.getRawAxis(5));
					
				} else {
					
					slideMotor.stopMotor();
					
				}
			}
Reply With Quote
  #14   Spotlight this post!  
Unread 17-02-2016, 20:34
rich2202 rich2202 is offline
Registered User
FRC #2202 (BEAST Robotics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Wisconsin
Posts: 1,212
rich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond reputerich2202 has a reputation beyond repute
Re: Issues with LimitSwitch

That would work better. I didn't look at your code in detail, so check that your code will move the arm away from the limit switch, or else your arm will permenantly stop when the limit switch is hit.
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 12:05.

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