Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit Switch initialization #44

Open
nicojopr opened this issue Jan 25, 2020 · 1 comment
Open

Limit Switch initialization #44

nicojopr opened this issue Jan 25, 2020 · 1 comment
Assignees
Labels
prototyping Prototyping and investigation

Comments

@nicojopr
Copy link
Contributor

nicojopr commented Jan 25, 2020

Want: set the limit switch to 0 while the robot is disabled as prep for the match. This task is investigative to see if this can be done while the robot is disabled and if so, develop the production code to handle this at match start. Contact: Controls team Gabby

Production software including:

  • commands
  • tested independently
  • merged and integrated with 2020 robot code in github
  • ready for integration
    ...etc..
@nicojopr nicojopr added the production Production software merged and integrated into our 2020 repo label Jan 25, 2020
@nicojopr nicojopr changed the title Vision Subsystem Limit Switch initialization Jan 25, 2020
@nicojopr nicojopr added the prototyping Prototyping and investigation label Jan 25, 2020
@nicojopr nicojopr assigned nicojopr and IshanBaliyan and unassigned nicojopr Feb 4, 2020
@kevlam2706
Copy link

Specifically, use the CTRE Talon SRX API to tell the Talon to manage the limit switch and reset the encoder value when the limit switch is set. Ensure this works when the robot is disabled.

NOTE: I pulled out the breaker for the lift Talon on Mergonaut to prevent damage while everyone was experimenting with code. You can get a breaker back from Controls to re-activate the lift motor, but be careful while experimenting. It is OK to accidentally drive the motor "below zero" because the winch rope will just unspool. However, if you keep that up, it will eventually respool the winch in the other direction and start lifting the elevator again. DO NOT drive the elevator past its upper limit or YOU WILL BREAK THE ELEVATOR.

Now that the dramatic warning is out of the way:

Steps to test:

Set up some robot code to initialize the lift Talon to use the encoder connected to it.
Set up the Talon to use the limit switch to prevent downward movement.
Set up the Talon to use the limit switch to reset the encoder value.
Set up the encoder value to display on Shuffleboard.

Now while the robot is disabled, manually turn the winch (with your hands). See that the encoder value increases to a non-zero value. Press the limit switch. Verify whether the encoder value goes back to 0.

@nicojopr nicojopr removed the production Production software merged and integrated into our 2020 repo label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prototyping Prototyping and investigation
Projects
None yet
Development

No branches or pull requests

4 participants