GoBilda starterbot troubleshooting

My team has been unable to get the “shotrequested” method within the GoBilda DECODE starter bot code to execute. We have tried multiple joysticks and have confirmed that the feeder motors and launcher motor work when triggered directly with a button press, but the logic within the “shotrequested” method doesn’t work at all.

We are trying to use the starter bot original design and original Blocks code without any modifications, and my team is not able to figure out the problem.

Is this a type of question that this forum can help answer?

Hey there!

Even though we didn’t write the code, Yes, absolutely, we can help. State machines can be difficult to understand, so I hope I can help you navigate the code.

First, I want to point out that the method name is launch, and the input parameter to the method is shotRequested. In the Teleop Code you can see that the edge-detected value of the Gamepad 1 Right Bumper is used as a true/false input to the launch method in order to start the launch sequence.

image

It’s important to note that the gamepad method RightBumperWasPressed is being used here. This only returns “true” the first time the button is pressed (and “false” any other time it’s called). In order to get the launch process to happen again, the button has to be released and pressed again once the launch state machine has completed and returned to idle (though the code doesn’t have any way to know that a ball has actually launched, it’s just using a timed value of how long it thinks it should take to shoot the ball).

If you want to just hold down the bumper and make it continuously shoot, you can change that from RightBumperWasPressed to simply RightBumper.

And, remember, the right bumper of the gamepad is the button “above” the right trigger (often mistaken for the trigger itself):

Though, be careful, on some Logitech F310 gamepads the bumper buttons can become jammed and not actually work (make sure the button is actually actuating).

-Danny

@cliff.rockwell Did this answer your question or solve your problem?

Yes, this was helpful. We discovered that the flywheel was partially rubbing against part of the frame, and this prevented it from reaching the minimum speed, and so the shotrequested never executed since it requires the minimum speed to be reached.

1 Like