We are trying to fix an issue with a hold on the arms of the robot. I do not have the code with me right now, but I will throw some pseudo code to see if I get some ideas or help
The arm stays down before auton, but once deployed it stays about 3 inches to high to get stars. So the team wants to make a hold where once they get it down they use minimal power to keep it to the ground without tripping the PTCs. They were trying all kinds of ifs, else ifs, and else stuff on controller 2 with no luck. Controller 1 controls the base and lift while controller 2 controls the claw.
My thought was some thing like this:
Button 5U lifts the arm and 5D lowers it. My thought is or was to maybe see if there was a way to make the hold deploy if both 5D and 5U were pushed at the same time. IS this possible?
What would the code be like?
I thought: (simplified pseudo)
If 5U is pushed then motors up 127
else If 5D is pushed then motors down -127
Else If 5U and 5D are pushed then motors down -25
Else motor == 0
Does this sound right or doable?
They have a very short amount of time to get it right in the lab Monday.
Thanks for and help or examples.