Our team, 321A, just finished a catapult based off the Wingus and Dingus catapult here: VEX Nothing But Net NZ Scrimmage 3 Finals - 7682 Wingus & Dingus - 398pts combined - YouTube
We can see that Wingus and Dingus used a potentiometer in their catapult but we don’t know how to program it to do what we need. What we need is to be able to press different buttons to switch the speed that the catapult launches the balls at. Any help would be appreciated.
Not completely sure what they use the potentiometer for, but I would think it is to tell the position of the catapult arm and “flick” it different distances depending on the strength of the shot. You’ll have to try around to see what works with your robot to get the different distances.
What I would do is make the program give each motor a lower value for the duration of the counts of the potentiometer. That would make it go slower and shoot shorter distances when you press that button. The potentiometer should count to where you want to shoot, maybe at a lower count than usual so your angle is higher, and with the lower motor value you should be able to make the high goal from a shorter distance due to the lesser amount of power and the sooner stop the motors have. (I must warn you though, by making it the motors that stop the swinging arm, you will have a lot of torque flowing in the opposite direction of the motors turn. You may want to have an adjustable structural stop for the arm where it’s on a rack and pinion and can be adjusted that way).
You can use simple “bang-bang” code on a catapult.
while(pot < value)
{
launcher = 127;
}
launcher = 0;
This could be pretty effective if you have the right values.
As Kevin stated, playing around is the best way to learn.
Thanks for the advice.
However, I found this post from Wingus and Dingus:
So I am curious as to how they used the potentiometer that is visible in their videos to achieve this, or if the potentiometers serve another purpose altogether. This quote, and the videos make me think that they never adjust the actual angle of the catapult, just the speed of the motors, which is what I am interested in figuring out.
However, now that I think of it, a rack and pinion gear would definitely be a viable mechanism to adjust the catapult angle and would probably help more than just slowing down the motors.
So you could change the speeds of the motor using potentiometer so it draws less current and my team is close to finishing the catapult to shoot across the field
Do you have robotc as your programming language?