Choo choo catpult programming - Bumper switch

Hi, Team is trying to program the choo choo catapult and trying to add a bumper switch to make it come back to its original position after each launch. but it seems to be not working. what are they doing wrong? or any other option that they can explore to build this capability?

I’m not sure why that’s not working, but I have a code that we used and I know works! I have a code block that is when controller button pressed spin Choo Choo forward, then I have a seperate block that says when bumper sensor pressed, stop Choo Choo. Also for either mine or yours to work you need to ensure the Choo Choo motors are set to hold so they hold the catapult down, and make sure the bumper sensor is working by going into devices on the brain and sewing if it is registering the bumper, and when it is pressed.

As I understand the choo choo mechanism, your team should turn it in one direction only. In my opinion, without seeing the team implementation of the mechanism, setting a starting angle (mechanism fully extended) and moving to the load position as part of the team setup, all the program has to do is turn the mechanism 360 degrees to return to the load position - launching the load within 5-10 degrees of the load position.

Send pictures

The issue likely is, when the catapult is already down, the catapult starts spinning, then tries to wait until it’s down, but it already it so it just stops instantly, to fix that you would have to allow the catapult to fire before waiting for it to drop.

Below is different way to control a catapult with Events. It also separates the concerns so it easier to diagnose the problem if the motor doesn’t start or doesn’t stop.

1 Like

Hi, Happy New Year !!!. It seems like the catapult base was not fully pressing the bumper. Team raised the bumper little a bit and it started working. Thank you all for your valuable input.